Ticket #3729: 3729-0010-extfs-hp48-misc-fixes.patch

File 3729-0010-extfs-hp48-misc-fixes.patch, 1.6 KB (added by mooffie, 7 years ago)
  • src/vfs/extfs/helpers/hp48+.in

    From 3b87f2b6a2778796ad94d83637e39cf6a21e14f2 Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Tue, 13 Dec 2016 01:02:20 +0200
    Subject: [PATCH 10/13] extfs: hp48: misc fixes.
    
    Two bugs fixed:
    
    * "printf -rw-r--r--" made printf complain about invalid option (although
      changing it to "printf -- -rw-r--r-" is possible, we don't know how portble
      this is).
    
    * Quotes around $INPUT defeat the purpose of the function calls (botched in
      commit 61b4642af4).
    ---
     src/vfs/extfs/helpers/hp48+.in | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/vfs/extfs/helpers/hp48+.in b/src/vfs/extfs/helpers/hp48+.in
    index ef136ec..7c28494 100644
    a b read -r INPUT 
    7777while [ "x$INPUT" != "xEOF" ] 
    7878do 
    7979    case `echo "$INPUT" | $AWK '{if (int($2)) if ($3 == "Directory") print "dir";else print "file"}'` in 
    80     dir) HP48_DIRS="$HP48_DIRS `hp48_retdir \"$INPUT\"`" 
    81     printf "drwxr-xr-x   1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize "$INPUT"` "`date +\"%b %d %Y %k:%M\"`" "$HP48_CDIR/`hp48_retdir \"$INPUT\"`";; 
    82     file) printf "-rw-r--r--   1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize "$INPUT"` "`date +\"%b %d %Y %k:%M\"`" "$HP48_CDIR/`hp48_retdir \"$INPUT\"`";; 
     80    dir) HP48_DIRS="$HP48_DIRS `hp48_retdir $INPUT`" 
     81    printf "drwxr-xr-x   1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize $INPUT` "`date +\"%b %d %Y %k:%M\"`" "$HP48_CDIR/`hp48_retdir $INPUT`";; 
     82    file) printf "%crw-r--r--   1 %-8d %-8d %8d %s %s\n" '-' 0 0 `hp48_retsize $INPUT` "`date +\"%b %d %Y %k:%M\"`" "$HP48_CDIR/`hp48_retdir $INPUT`";; 
    8383    esac 
    8484    read -r INPUT 
    8585done