mkfs.reiserfs refuses to create a filesystem on full devices without
authorBarry Naujok <bnaujok@sgi.com>
Thu, 29 May 2008 17:01:09 +0000 (17:01 +0000)
committerBarry Naujok <bnaujok@sgi.com>
Thu, 29 May 2008 17:01:09 +0000 (17:01 +0000)
partitions unless it's given -f in addition to the already required Y
input to confirm the fs creation, so give the argument to it.

While we're at it also write the full command line used to create the
filesystem into the log to ease future debugging.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:31250a by kenmcd.

  Execute bits changed from xxx to ---
  Fix up test with reiserfs

032

diff --git a/032 b/032
index 11dc30bf9a42b2ccb310f0897cf2f63e58d5f903..5c23ebf2eb5c60729077de93416a6e41a1829c3d 100755 (executable)
--- a/032
+++ b/032
@@ -43,7 +43,7 @@ do
        [ $fs = vfat ] && postargs=2000
        # these folks prompt before writing
        [ $fs = jfs ] && preop="echo Y |"
-       [ $fs = reiserfs ] && preop="echo y |"
+       [ $fs = reiserfs ] && preop="echo y |" && preargs="-f"
        # cramfs mkfs requires a directory argument
        [ $fs = cramfs ] && preargs=/proc/fs/xfs
 
@@ -52,7 +52,7 @@ do
 
        # create a filesystem of this type
        echo "=== Creating $fs filesystem..." >>$seq.full
-       echo "    ( mkfs -t $fs $SCRATCH_DEV )" >>$seq.full
+       echo "    ( $preop mkfs -t $fs $preargs $SCRATCH_DEV $postargs )" >>$seq.full
        eval $preop mkfs -t $fs $preargs $SCRATCH_DEV $postargs >>$seq.full 2>&1
 
        # next, ensure we don't overwrite it