From be8b8f0c7f9a398aec4b43b541340aece932d732 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Tue, 31 Oct 2006 16:08:47 +0000 Subject: [PATCH] check for mount and mkfs failures and exit if failure occurs, rather than fill qa machines root fs. Merge of master-melb:xfs-cmds:27324a by kenmcd. --- 041 | 7 +++---- 042 | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/041 b/041 index 3eca05e1..94036e0e 100755 --- a/041 +++ b/041 @@ -50,10 +50,9 @@ _do_die_on_error=message_only rm -f $seq.full agsize=32 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... " -_do "_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1" -[ $? -ne 0 ] && exit -_do "_scratch_mount" -[ $? -ne 0 ] && exit +_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed" +_scratch_mount || _fail "mount failed" + echo "done" # full allocation group -> partial; partial -> expand partial + new partial; diff --git a/042 b/042 index 47a5f4ed..7c2bcac4 100755 --- a/042 +++ b/042 @@ -76,8 +76,9 @@ rm -f $seq.full _do_die_on_error=message_only echo -n "Make a 48 megabyte filesystem on SCRATCH_DEV and mount... " -_do "_scratch_mkfs_xfs -dsize=48m,agcount=3" -_do "_scratch_mount" +_scratch_mkfs_xfs -dsize=48m,agcount=3 2>&1 >/dev/null || _fail "mkfs failed" +_scratch_mount || _fail "mount failed" + echo "done" echo -n "Reserve 16 1Mb unfragmented regions... " -- 2.39.5