tests: Remove $((BASE#NUM)) bashism in grub-fs-tester

This bashism allows converting NUM in base BASE to decimal. Its not needed
because the only place its used is to convert from hexidecimal and this can
also be done with the more portable $((0xHEXNUM)) syntax.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Glenn Washburn authored and Daniel Kiper committed 2022-02-08 16:06:50 +01:00
1 parent cdefaf1f58
commit a9c2257761
1 file changed
+5 -5
+5 -5
View File
@@ -459,7 +459,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
# FIXME: not so sure about AFFS # FIXME: not so sure about AFFS
# OS LIMITATION: minix2/minix3 could be formatted in a way to permit more. # OS LIMITATION: minix2/minix3 could be formatted in a way to permit more.
x"minix3" | x"minix2" | x"hfs"| x"affs" | xaffs_intl | xreiserfs_old | xext2_old) x"minix3" | x"minix2" | x"hfs"| x"affs" | xaffs_intl | xreiserfs_old | xext2_old)
BIGBLOCKCNT=$((16#7fffffff));; BIGBLOCKCNT=$((0x7fffffff));;
# FS LIMITATION: redundant storage # FS LIMITATION: redundant storage
# We have only limited space. Mirroring multiplies it very effectively. # We have only limited space. Mirroring multiplies it very effectively.
@@ -669,18 +669,18 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
# mkfs.hfs and mkfs.hfsplus don't fill UUID. # mkfs.hfs and mkfs.hfsplus don't fill UUID.
x"hfsplus") x"hfsplus")
"mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}" "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 ;; dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 ;;
x"hfsplus_wrap") x"hfsplus_wrap")
"mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}" "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8
MOUNTFS="hfsplus";; MOUNTFS="hfsplus";;
x"hfsplus_casesens") x"hfsplus_casesens")
"mkfs.hfsplus" -s -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}" "mkfs.hfsplus" -s -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8
MOUNTFS="hfsplus";; MOUNTFS="hfsplus";;
x"hfs") x"hfs")
"mkfs.hfs" -b $BLKSIZE -v "`echo $FSLABEL |recode utf8..macroman`" -h "${MOUNTDEVICE}" "mkfs.hfs" -b $BLKSIZE -v "`echo $FSLABEL |recode utf8..macroman`" -h "${MOUNTDEVICE}"
dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#474)) conv=notrunc count=8 dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x474)) conv=notrunc count=8
MOUNTOPTS="iocharset=utf8,codepage=macroman," MOUNTOPTS="iocharset=utf8,codepage=macroman,"
;; ;;
x"vfat"*|xmsdos*) x"vfat"*|xmsdos*)