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) | |
download | busybox-w32-990d0f63eeb502c8762076e5c5499196e09cba55.tar.gz busybox-w32-990d0f63eeb502c8762076e5c5499196e09cba55.tar.bz2 busybox-w32-990d0f63eeb502c8762076e5c5499196e09cba55.zip |
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 { | |||
79 | char *base_device; /* /dev/hda for /dev/hdaN etc */ | 79 | char *base_device; /* /dev/hda for /dev/hdaN etc */ |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static const char *const ignored_types[] = { | 82 | static const char ignored_types[] = |
83 | "ignore", | 83 | "ignore\0" |
84 | "iso9660", | 84 | "iso9660\0" |
85 | "nfs", | 85 | "nfs\0" |
86 | "proc", | 86 | "proc\0" |
87 | "sw", | 87 | "sw\0" |
88 | "swap", | 88 | "swap\0" |
89 | "tmpfs", | 89 | "tmpfs\0" |
90 | "devpts", | 90 | "devpts\0"; |
91 | NULL | ||
92 | }; | ||
93 | 91 | ||
94 | #if 0 | 92 | #if 0 |
95 | static const char *const really_wanted[] = { | 93 | static const char really_wanted[] = |
96 | "minix", | 94 | "minix\0" |
97 | "ext2", | 95 | "ext2\0" |
98 | "ext3", | 96 | "ext3\0" |
99 | "jfs", | 97 | "jfs\0" |
100 | "reiserfs", | 98 | "reiserfs\0" |
101 | "xiafs", | 99 | "xiafs\0" |
102 | "xfs", | 100 | "xfs\0"; |
103 | NULL | ||
104 | }; | ||
105 | #endif | 101 | #endif |
106 | 102 | ||
107 | #define BASE_MD "/dev/md" | 103 | #define BASE_MD "/dev/md" |
@@ -847,7 +843,7 @@ static int ignore(struct fs_info *fs) | |||
847 | return 1; | 843 | return 1; |
848 | 844 | ||
849 | /* Are we ignoring this type? */ | 845 | /* Are we ignoring this type? */ |
850 | if (index_in_str_array(ignored_types, fs->type) >= 0) | 846 | if (index_in_strings(ignored_types, fs->type) >= 0) |
851 | return 1; | 847 | return 1; |
852 | 848 | ||
853 | /* We can and want to check this file system type. */ | 849 | /* We can and want to check this file system type. */ |