X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util-linux%2Ffsck_minix.c;h=1508ecb033a64fdae723a65bda31c076181a3ce5;hb=f85bd1a7a7e712c4dd2dfd86daa9ab01a708b7b4;hp=18ea05fecae37d5c5bbe1b0952da6f3d4763346a;hpb=6331cf059ccfdf35f4e5a505cbae885094cc41b0;p=oweals%2Fbusybox.git diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 18ea05fec..1508ecb03 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -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. */ /* @@ -87,6 +87,18 @@ * 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 #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);