httpd: remove redundant NULL assignment and save one strrchr. -8 bytes
[oweals/busybox.git] / util-linux / fsck_minix.c
index 18ea05fecae37d5c5bbe1b0952da6f3d4763346a..1508ecb033a64fdae723a65bda31c076181a3ce5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * (C) 1991, 1992 Linus Torvalds.
  *
- * Licensed under GPLv2, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2, see file LICENSE in this source tree.
  */
 
 /*
  * enforced (but it's not much fun on a character device :-).
  */
 
+//usage:#define fsck_minix_trivial_usage
+//usage:       "[-larvsmf] BLOCKDEV"
+//usage:#define fsck_minix_full_usage "\n\n"
+//usage:       "Check MINIX filesystem\n"
+//usage:     "\n       -l      List all filenames"
+//usage:     "\n       -r      Perform interactive repairs"
+//usage:     "\n       -a      Perform automatic repairs"
+//usage:     "\n       -v      Verbose"
+//usage:     "\n       -s      Output superblock information"
+//usage:     "\n       -m      Show \"mode not cleared\" warnings"
+//usage:     "\n       -f      Force file system check"
+
 #include <mntent.h>
 #include "libbb.h"
 #include "minix.h"
@@ -157,7 +169,6 @@ struct globals {
        /* File-name data */
        char current_name[MAX_DEPTH * MINIX_NAME_MAX];
 };
-
 #define G (*ptr_to_globals)
 #if ENABLE_FEATURE_MINIX2
 #define version2           (G.version2           )
@@ -898,8 +909,12 @@ static void check_zones(unsigned i)
        if (inode_count[i] > 1)         /* have we counted this file already? */
                return;
        inode = Inode1 + i;
-       if (!S_ISDIR(inode->i_mode) && !S_ISREG(inode->i_mode) &&
-               !S_ISLNK(inode->i_mode)) return;
+       if (!S_ISDIR(inode->i_mode)
+        && !S_ISREG(inode->i_mode)
+        && !S_ISLNK(inode->i_mode)
+       ) {
+               return;
+       }
        for (i = 0; i < 7; i++)
                add_zone(i + inode->i_zone, &changed);
        add_zone_ind(7 + inode->i_zone, &changed);