change the interface of libbb/compare_string_array (unsigned short to int), usaging for e2fsprogs/fsck
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -1006,11 +1006,11 @@ static int ignore(struct fs_info *fs) | |
| if (!fs_match(fs, &fs_type_compiled)) return 1; | |
| /* Are we ignoring this type? */ | |
| - | if(compare_string_array(ignored_types, fs->type)) |
| + | if(compare_string_array(ignored_types, fs->type) >= 0) |
| return 1; | |
| /* Do we really really want to check this fs? */ | |
| - | wanted = compare_string_array(really_wanted, fs->type); |
| + | wanted = compare_string_array(really_wanted, fs->type) >= 0; |
| /* See if the <fsck.fs> program is available. */ | |
| s = find_fsck(fs->type); | |
| @@ -466,7 +466,7 @@ typedef struct { | |
| } procps_status_t; | |
| extern procps_status_t * procps_scan(int save_user_arg0); | |
| - | extern unsigned short compare_string_array(const char * const string_array[], const char *key); |
| + | extern int compare_string_array(const char * const string_array[], const char *key); |
| extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret); | |
| @@ -17,16 +17,16 @@ | |
| #include <string.h> | |
| /* returns the array number of the string */ | |
| - | extern unsigned short |
| + | extern int |
| compare_string_array(const char * const string_array[], const char *key) | |
| { | |
| - | unsigned short i; |
| + | int i; |
| for (i = 0; string_array[i] != 0; i++) { | |
| if (strcmp(string_array[i], key) == 0) { | |
| - | break; |
| + | return i; |
| } | |
| } | |
| - | return(i); |
| + | return -i; |
| } | |