From 019ab5c012e28eb0f1349951668cbac3a597354d Mon Sep 17 00:00:00 2001 From: Mooffie Date: Tue, 13 Dec 2016 01:02:20 +0200 Subject: [PATCH] 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 ef136ec35..7c284946b 100644 --- a/src/vfs/extfs/helpers/hp48+.in +++ b/src/vfs/extfs/helpers/hp48+.in @@ -77,9 +77,9 @@ read -r INPUT while [ "x$INPUT" != "xEOF" ] do case `echo "$INPUT" | $AWK '{if (int($2)) if ($3 == "Directory") print "dir";else print "file"}'` in - dir) HP48_DIRS="$HP48_DIRS `hp48_retdir \"$INPUT\"`" - 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\"`";; - 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\"`";; + dir) HP48_DIRS="$HP48_DIRS `hp48_retdir $INPUT`" + 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`";; + 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`";; esac read -r INPUT done