From e87ba6a93e151a63c78b2d0354aeeda0ee670b8b Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 3 Apr 2002 07:31:18 +0000 Subject: [PATCH] You don't need to specify the size for new_fs() if you are using a block device (we just use the whole block device in that case). --- lustre/tests/common.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lustre/tests/common.sh b/lustre/tests/common.sh index 51604eb..1c8bc99 100644 --- a/lustre/tests/common.sh +++ b/lustre/tests/common.sh @@ -45,14 +45,18 @@ new_fs () { MKFS="mkfs.$1" MKFSOPT="-b 4096" - [ $# -ne 3 ] && echo "usage: $0 " 1>&2 && exit -1 - [ "$1" = "ext3" ] && MKFS="mkfs.ext2 -j" if [ -b "$2" ]; then - $MKFS $MKFSOPT $2 || exit -1 + [ $# -lt 2 -o $# -gt 3 ] && \ + echo "usage: $0 [size]" 1>&2 && exit -1 + + $MKFS $MKFSOPT $2 $3 || exit -1 LOOPDEV=$2 # Not really a loop device else + [ $# -ne 3 ] && \ + echo "usage: $0 " 1>&2 && exit -1 + if [ -f "$EFILE" ]; then echo "using existing filesystem $EFILE for $2" zcat "$EFILE" > $2 || exit -1 -- 1.8.3.1