neaten some of the pattern matching code
authorAndrew Gildfind <ajag@sgi.com>
Thu, 19 Jul 2001 03:51:46 +0000 (03:51 +0000)
committerAndrew Gildfind <ajag@sgi.com>
Thu, 19 Jul 2001 03:51:46 +0000 (03:51 +0000)
src/fill2fs

index ea58ab36e7c9b217009877f505fc75ea49cec345..fafde01fde72b36aae252cb71443ea138b93eab8 100755 (executable)
@@ -107,15 +107,15 @@ sub fsinfo {
     die("Error: $progname: can't read device: \"$dev\"\n") if (! -r $dev);
     $_=`xfs_db -r -c sb -c p $dev`;
     # multiline matching ^$ refers to individual lines...
-    /^dblocks = (\d+)$/m;      $fsblocks=$1;
-    /^blocksize = (\d+)$/m;    $fsblocksize=$1;
-    /^agblocks = (\d+)$/m;     $agblocks=$1;
-    /^agcount = (\d+)$/m;      $agcount=$1;
-    /^imax_pct = (\d+)$/m;     $imax_pct=$1;
-    /^logblocks = (\d+)$/m;    $logblocks=$1;
-    /^logstart = (\d+)$/m;     $logstart=$1;
+    ($fsblocks) = /^dblocks = (\d+)$/m;
+    ($fsblocksize) = /^blocksize = (\d+)$/m;
+    ($agblocks) = /^agblocks = (\d+)$/m;
+    ($agcount) = /^agcount = (\d+)$/m;
+    ($imax_pct) = /^imax_pct = (\d+)$/m;
+    ($logblocks) = /^logblocks = (\d+)$/m;
+    ($logstart) = /^logstart = (\d+)$/m;
     $internal = $logstart > 0 ? " (internal)" : "";
-    
+
     $verbose && print STDERR <<"EOF"
 Filesystem information:
   type=$type; device=$dev