diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-11-26 10:33:55 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-11-26 10:33:55 +0000 |
commit | 61ff4b39738085d1b88d934f619b840fd296c8a8 (patch) | |
tree | 3f0e8887aeecd290f7c32ae413ee6e720733c94b /e2fsprogs/fsck.c | |
parent | 4eb2fd6826aa197dcdbf3618fa0cae9d2de73d86 (diff) | |
download | busybox-w32-61ff4b39738085d1b88d934f619b840fd296c8a8.tar.gz busybox-w32-61ff4b39738085d1b88d934f619b840fd296c8a8.tar.bz2 busybox-w32-61ff4b39738085d1b88d934f619b840fd296c8a8.zip |
more use const for interface of libbb/compare_string_array, example usage for e2fsprogs/fsck
Diffstat (limited to 'e2fsprogs/fsck.c')
-rw-r--r-- | e2fsprogs/fsck.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index b7e25d68a..ae4e3d0c8 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c | |||
@@ -988,8 +988,7 @@ static int fs_match(struct fs_info *fs, struct fs_type_compile *cmp) | |||
988 | /* Check if we should ignore this filesystem. */ | 988 | /* Check if we should ignore this filesystem. */ |
989 | static int ignore(struct fs_info *fs) | 989 | static int ignore(struct fs_info *fs) |
990 | { | 990 | { |
991 | const char * const *ip; | 991 | int wanted; |
992 | int wanted = 0; | ||
993 | char *s; | 992 | char *s; |
994 | 993 | ||
995 | /* | 994 | /* |
@@ -1007,15 +1006,11 @@ static int ignore(struct fs_info *fs) | |||
1007 | if (!fs_match(fs, &fs_type_compiled)) return 1; | 1006 | if (!fs_match(fs, &fs_type_compiled)) return 1; |
1008 | 1007 | ||
1009 | /* Are we ignoring this type? */ | 1008 | /* Are we ignoring this type? */ |
1010 | for(ip = ignored_types; *ip; ip++) | 1009 | if(compare_string_array(ignored_types, fs->type)) |
1011 | if (strcmp(fs->type, *ip) == 0) return 1; | 1010 | return 1; |
1012 | 1011 | ||
1013 | /* Do we really really want to check this fs? */ | 1012 | /* Do we really really want to check this fs? */ |
1014 | for(ip = really_wanted; *ip; ip++) | 1013 | wanted = compare_string_array(really_wanted, fs->type); |
1015 | if (strcmp(fs->type, *ip) == 0) { | ||
1016 | wanted = 1; | ||
1017 | break; | ||
1018 | } | ||
1019 | 1014 | ||
1020 | /* See if the <fsck.fs> program is available. */ | 1015 | /* See if the <fsck.fs> program is available. */ |
1021 | s = find_fsck(fs->type); | 1016 | s = find_fsck(fs->type); |