diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-24 15:54:42 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-24 15:54:42 +0000 |
commit | 990d0f63eeb502c8762076e5c5499196e09cba55 (patch) | |
tree | 30a2091a8159b1694d65f9952e2aba2667d7dc11 /e2fsprogs/fsck.c | |
parent | bcb66ec22e82f6b1ab93f3aec917269393a5b464 (diff) |
Replace index_in_[sub]str_array with index_in_[sub]strings,
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.
text data bss dec hex filename
781266 1328 11844 794438 c1f46 busybox_old
781010 1328 11844 794182 c1e46 busybox_unstripped
Diffstat (limited to 'e2fsprogs/fsck.c')
-rw-r--r-- | e2fsprogs/fsck.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 2954cabf3..eb1fa84c8 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -79,29 +79,25 @@ struct fsck_instance { char *base_device; /* /dev/hda for /dev/hdaN etc */ }; -static const char *const ignored_types[] = { - "ignore", - "iso9660", - "nfs", - "proc", - "sw", - "swap", - "tmpfs", - "devpts", - NULL -}; +static const char ignored_types[] = + "ignore\0" + "iso9660\0" + "nfs\0" + "proc\0" + "sw\0" + "swap\0" + "tmpfs\0" + "devpts\0"; #if 0 -static const char *const really_wanted[] = { - "minix", - "ext2", - "ext3", - "jfs", - "reiserfs", - "xiafs", - "xfs", - NULL -}; +static const char really_wanted[] = + "minix\0" + "ext2\0" + "ext3\0" + "jfs\0" + "reiserfs\0" + "xiafs\0" + "xfs\0"; #endif #define BASE_MD "/dev/md" @@ -847,7 +843,7 @@ static int ignore(struct fs_info *fs) return 1; /* Are we ignoring this type? */ - if (index_in_str_array(ignored_types, fs->type) >= 0) + if (index_in_strings(ignored_types, fs->type) >= 0) return 1; /* We can and want to check this file system type. */ |