mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
misc: fix $MKFS_PROG.$FSTYP usage treewide
Replace all the $MKFS_PROG.$FSTYP invocations with $MKFS_PROG -t $FSTYP. The mkfs wrapper binary knows how to search the user's $PATH to find the appropriate mkfs delegate, which the author uses to switch between development and distro versions of various tools. Unfortunately, using "$MKFS_PROG.$FSTYP" means that the shell only looks in the same directory as the mkfs wrapper, which means that we can end up mixing different tool versions when this is the case. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
85bf3af7c2
commit
f220ab921e
@@ -987,7 +987,7 @@ _scratch_mkfs_sized()
|
||||
fi
|
||||
;;
|
||||
ext2|ext3|ext4|ext4dev)
|
||||
${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
;;
|
||||
gfs2)
|
||||
# mkfs.gfs2 doesn't automatically shrink journal files on small
|
||||
@@ -1002,10 +1002,10 @@ _scratch_mkfs_sized()
|
||||
(( journal_size >= min_journal_size )) || journal_size=$min_journal_size
|
||||
MKFS_OPTIONS="-J $journal_size $MKFS_OPTIONS"
|
||||
fi
|
||||
${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV $blocks
|
||||
${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV $blocks
|
||||
;;
|
||||
ocfs2)
|
||||
yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
yes | ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
;;
|
||||
udf)
|
||||
$MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
@@ -1019,10 +1019,10 @@ _scratch_mkfs_sized()
|
||||
$MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV
|
||||
;;
|
||||
jfs)
|
||||
${MKFS_PROG}.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks
|
||||
${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks
|
||||
;;
|
||||
reiserfs)
|
||||
${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
|
||||
;;
|
||||
reiser4)
|
||||
# mkfs.resier4 requires size in KB as input for creating filesystem
|
||||
@@ -1101,13 +1101,13 @@ _scratch_mkfs_blocksized()
|
||||
_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
|
||||
;;
|
||||
ext2|ext3|ext4)
|
||||
${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV
|
||||
${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV
|
||||
;;
|
||||
gfs2)
|
||||
${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV
|
||||
${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV
|
||||
;;
|
||||
ocfs2)
|
||||
yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize -C $blocksize $SCRATCH_DEV
|
||||
yes | ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize -C $blocksize $SCRATCH_DEV
|
||||
;;
|
||||
*)
|
||||
_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_blocksized"
|
||||
|
||||
Reference in New Issue
Block a user