whitespace cleanup
[mapsector.git] / lib / 50_scan_extfs.sh
index f2004f1..45408ce 100644 (file)
@@ -26,8 +26,8 @@ do_extfs()
     fsblocksize="`tune2fs -l $device | awk '/Block size/{print $3/512}'`"
 
     if [ -z "$fsblocksize" ]; then
-       echo "! $device is not ext2/ext3" 1>&2
-       exit 1
+        echo "! $device is not ext2/ext3" 1>&2
+        exit 1
     fi
 
     fsblock="`dc -e "$sector $fsblocksize ~ n [ ] n p"`" #`"
@@ -41,8 +41,8 @@ do_extfs()
     # Step 7: Check, whether block is in use
 
     if echo "testb $fsblock" | debugfs $device 2>/dev/null | grep -qF "not in use"; then
-       echo "blockstate free"
-       exit 0
+        echo "blockstate free"
+        exit 0
     fi
     echo "blockstate used"
 
@@ -51,8 +51,8 @@ do_extfs()
     inode="`echo "icheck $fsblock" | debugfs $device 2>/dev/null | awk 'FNR>1{print $2}'`" #`"
 
     if [ -z "$inode" ]; then
-       echo "blocktype meta?"
-       exit 0
+        echo "blocktype meta?"
+        exit 0
     fi
 
     echo "inode $inode"
@@ -60,22 +60,22 @@ do_extfs()
     # Step 9: Find file name(s) referencing the inode
 
     (
-       namefound="$(\
-           echo "ncheck $inode" \
-               | debugfs $device 2>/dev/null \
-               | sed -e '1d' -e 's/^[0-9]*[    ]*//' -e 's/^\/\//\//' \
-               | while read name; do \
-               if [ -z "$firstname" ]; then \
-                   echo "blocktype data" 1>&3; \
-                   echo "1"; \
-                   firstname=1; \
-               fi; \
-               echo "name $name" 1>&3; \
-           done \
-       )"
-       if [ -z "$namefound" ]; then
-           echo "blocktype journal?"
-       fi
+        namefound="$(\
+            echo "ncheck $inode" \
+                | debugfs $device 2>/dev/null \
+                | sed -e '1d' -e 's/^[0-9]*[    ]*//' -e 's/^\/\//\//' \
+                | while read name; do \
+                if [ -z "$firstname" ]; then \
+                    echo "blocktype data" 1>&3; \
+                    echo "1"; \
+                    firstname=1; \
+                fi; \
+                echo "name $name" 1>&3; \
+            done \
+        )"
+        if [ -z "$namefound" ]; then
+            echo "blocktype journal?"
+        fi
     ) 3>&1
 
     return 0