diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-07-13 09:57:38 -0400 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-07-13 09:57:38 -0400 |
commit | f7f24758ac98a506770bc5910d33567610fa3403 (patch) | |
tree | ff7fad3d01bf9dc2e2e54b908f9fca4891e1ee72 /scripts | |
parent | b38a3ab3d1bb0dc3288f73903d4dc4672b5cd2d0 (diff) | |
parent | c32511e2718618f0b53479eb36e07439aa363a74 (diff) |
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/basic/docproc.c | 14 | ||||
-rw-r--r-- | scripts/basic/fixdep.c | 20 | ||||
-rw-r--r-- | scripts/basic/split-include.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 6 | ||||
-rw-r--r-- | scripts/kconfig/confdata.c | 4 | ||||
-rw-r--r-- | scripts/kconfig/mconf.c | 5 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 61 |
7 files changed, 87 insertions, 25 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index 8ca7ecdb68fb..cb02baa63256 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c | |||
@@ -52,7 +52,7 @@ FILEONLY *internalfunctions; | |||
52 | FILEONLY *externalfunctions; | 52 | FILEONLY *externalfunctions; |
53 | FILEONLY *symbolsonly; | 53 | FILEONLY *symbolsonly; |
54 | 54 | ||
55 | typedef void FILELINE(char * file, signed char * line); | 55 | typedef void FILELINE(char * file, char * line); |
56 | FILELINE * singlefunctions; | 56 | FILELINE * singlefunctions; |
57 | FILELINE * entity_system; | 57 | FILELINE * entity_system; |
58 | 58 | ||
@@ -148,9 +148,9 @@ struct symfile * filename_exist(char * filename) | |||
148 | * Files are separated by tabs. | 148 | * Files are separated by tabs. |
149 | */ | 149 | */ |
150 | void adddep(char * file) { printf("\t%s", file); } | 150 | void adddep(char * file) { printf("\t%s", file); } |
151 | void adddep2(char * file, signed char * line) { line = line; adddep(file); } | 151 | void adddep2(char * file, char * line) { line = line; adddep(file); } |
152 | void noaction(char * line) { line = line; } | 152 | void noaction(char * line) { line = line; } |
153 | void noaction2(char * file, signed char * line) { file = file; line = line; } | 153 | void noaction2(char * file, char * line) { file = file; line = line; } |
154 | 154 | ||
155 | /* Echo the line without further action */ | 155 | /* Echo the line without further action */ |
156 | void printline(char * line) { printf("%s", line); } | 156 | void printline(char * line) { printf("%s", line); } |
@@ -179,8 +179,8 @@ void find_export_symbols(char * filename) | |||
179 | perror(real_filename); | 179 | perror(real_filename); |
180 | } | 180 | } |
181 | while(fgets(line, MAXLINESZ, fp)) { | 181 | while(fgets(line, MAXLINESZ, fp)) { |
182 | signed char *p; | 182 | char *p; |
183 | signed char *e; | 183 | char *e; |
184 | if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || | 184 | if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || |
185 | ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { | 185 | ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { |
186 | /* Skip EXPORT_SYMBOL{_GPL} */ | 186 | /* Skip EXPORT_SYMBOL{_GPL} */ |
@@ -253,7 +253,7 @@ void extfunc(char * filename) { docfunctions(filename, FUNCTION); } | |||
253 | * Call kernel-doc with the following parameters: | 253 | * Call kernel-doc with the following parameters: |
254 | * kernel-doc -docbook -function function1 [-function function2] | 254 | * kernel-doc -docbook -function function1 [-function function2] |
255 | */ | 255 | */ |
256 | void singfunc(char * filename, signed char * line) | 256 | void singfunc(char * filename, char * line) |
257 | { | 257 | { |
258 | char *vec[200]; /* Enough for specific functions */ | 258 | char *vec[200]; /* Enough for specific functions */ |
259 | int i, idx = 0; | 259 | int i, idx = 0; |
@@ -290,7 +290,7 @@ void singfunc(char * filename, signed char * line) | |||
290 | void parse_file(FILE *infile) | 290 | void parse_file(FILE *infile) |
291 | { | 291 | { |
292 | char line[MAXLINESZ]; | 292 | char line[MAXLINESZ]; |
293 | signed char * s; | 293 | char * s; |
294 | while(fgets(line, MAXLINESZ, infile)) { | 294 | while(fgets(line, MAXLINESZ, infile)) { |
295 | if (line[0] == '!') { | 295 | if (line[0] == '!') { |
296 | s = line + 2; | 296 | s = line + 2; |
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 7f42c5d8a5a2..0b61bea869f7 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -212,23 +212,23 @@ void use_config(char *m, int slen) | |||
212 | if (*p == '_') | 212 | if (*p == '_') |
213 | *p = '/'; | 213 | *p = '/'; |
214 | else | 214 | else |
215 | *p = tolower((unsigned char)*p); | 215 | *p = tolower((int)*p); |
216 | } | 216 | } |
217 | printf(" $(wildcard include/config/%s.h) \\\n", s); | 217 | printf(" $(wildcard include/config/%s.h) \\\n", s); |
218 | } | 218 | } |
219 | 219 | ||
220 | void parse_config_file(signed char *map, size_t len) | 220 | void parse_config_file(char *map, size_t len) |
221 | { | 221 | { |
222 | int *end = (int *) (map + len); | 222 | int *end = (int *) (map + len); |
223 | /* start at +1, so that p can never be < map */ | 223 | /* start at +1, so that p can never be < map */ |
224 | int *m = (int *) map + 1; | 224 | int *m = (int *) map + 1; |
225 | signed char *p, *q; | 225 | char *p, *q; |
226 | 226 | ||
227 | for (; m < end; m++) { | 227 | for (; m < end; m++) { |
228 | if (*m == INT_CONF) { p = (signed char *) m ; goto conf; } | 228 | if (*m == INT_CONF) { p = (char *) m ; goto conf; } |
229 | if (*m == INT_ONFI) { p = (signed char *) m-1; goto conf; } | 229 | if (*m == INT_ONFI) { p = (char *) m-1; goto conf; } |
230 | if (*m == INT_NFIG) { p = (signed char *) m-2; goto conf; } | 230 | if (*m == INT_NFIG) { p = (char *) m-2; goto conf; } |
231 | if (*m == INT_FIG_) { p = (signed char *) m-3; goto conf; } | 231 | if (*m == INT_FIG_) { p = (char *) m-3; goto conf; } |
232 | continue; | 232 | continue; |
233 | conf: | 233 | conf: |
234 | if (p > map + len - 7) | 234 | if (p > map + len - 7) |
@@ -291,9 +291,9 @@ void do_config_file(char *filename) | |||
291 | 291 | ||
292 | void parse_dep_file(void *map, size_t len) | 292 | void parse_dep_file(void *map, size_t len) |
293 | { | 293 | { |
294 | signed char *m = map; | 294 | char *m = map; |
295 | signed char *end = m + len; | 295 | char *end = m + len; |
296 | signed char *p; | 296 | char *p; |
297 | char s[PATH_MAX]; | 297 | char s[PATH_MAX]; |
298 | 298 | ||
299 | p = strchr(m, ':'); | 299 | p = strchr(m, ':'); |
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index 60fc4d8ebaa9..459c45276cb1 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c | |||
@@ -104,7 +104,7 @@ int main(int argc, const char * argv []) | |||
104 | /* Read config lines. */ | 104 | /* Read config lines. */ |
105 | while (fgets(line, buffer_size, fp_config)) | 105 | while (fgets(line, buffer_size, fp_config)) |
106 | { | 106 | { |
107 | const signed char * str_config; | 107 | const char * str_config; |
108 | int is_same; | 108 | int is_same; |
109 | int itarget; | 109 | int itarget; |
110 | 110 | ||
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 70e7264c6942..bc20cab9d0d6 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -31,14 +31,14 @@ char *defconfig_file; | |||
31 | static int indent = 1; | 31 | static int indent = 1; |
32 | static int valid_stdin = 1; | 32 | static int valid_stdin = 1; |
33 | static int conf_cnt; | 33 | static int conf_cnt; |
34 | static signed char line[128]; | 34 | static char line[128]; |
35 | static struct menu *rootEntry; | 35 | static struct menu *rootEntry; |
36 | 36 | ||
37 | static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); | 37 | static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); |
38 | 38 | ||
39 | static void strip(signed char *str) | 39 | static void strip(char *str) |
40 | { | 40 | { |
41 | signed char *p = str; | 41 | char *p = str; |
42 | int l; | 42 | int l; |
43 | 43 | ||
44 | while ((isspace(*p))) | 44 | while ((isspace(*p))) |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 2755c459d780..02f670cc6bb9 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -27,10 +27,10 @@ const char *conf_confnames[] = { | |||
27 | NULL, | 27 | NULL, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static char *conf_expand_value(const signed char *in) | 30 | static char *conf_expand_value(const char *in) |
31 | { | 31 | { |
32 | struct symbol *sym; | 32 | struct symbol *sym; |
33 | const signed char *src; | 33 | const char *src; |
34 | static char res_value[SYMBOL_MAXLENGTH]; | 34 | static char res_value[SYMBOL_MAXLENGTH]; |
35 | char *dst, name[SYMBOL_MAXLENGTH]; | 35 | char *dst, name[SYMBOL_MAXLENGTH]; |
36 | 36 | ||
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index e5db10ca9564..457bec29511d 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <string.h> | 20 | #include <string.h> |
21 | #include <termios.h> | 21 | #include <termios.h> |
22 | #include <unistd.h> | 22 | #include <unistd.h> |
23 | #include <locale.h> | ||
23 | 24 | ||
24 | #define LKC_DIRECT_LINK | 25 | #define LKC_DIRECT_LINK |
25 | #include "lkc.h" | 26 | #include "lkc.h" |
@@ -254,8 +255,8 @@ search_help[] = N_( | |||
254 | " USB$ => find all CONFIG_ symbols ending with USB\n" | 255 | " USB$ => find all CONFIG_ symbols ending with USB\n" |
255 | "\n"); | 256 | "\n"); |
256 | 257 | ||
257 | static signed char buf[4096], *bufptr = buf; | 258 | static char buf[4096], *bufptr = buf; |
258 | static signed char input_buf[4096]; | 259 | static char input_buf[4096]; |
259 | static char filename[PATH_MAX+1] = ".config"; | 260 | static char filename[PATH_MAX+1] = ".config"; |
260 | static char *args[1024], **argptr = args; | 261 | static char *args[1024], **argptr = args; |
261 | static int indent; | 262 | static int indent; |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 32197efe67ed..5180405c1a84 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -25,6 +25,8 @@ typedef Elf64_Addr kernel_ulong_t; | |||
25 | #include <stdint.h> | 25 | #include <stdint.h> |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include <ctype.h> | ||
29 | |||
28 | typedef uint32_t __u32; | 30 | typedef uint32_t __u32; |
29 | typedef uint16_t __u16; | 31 | typedef uint16_t __u16; |
30 | typedef unsigned char __u8; | 32 | typedef unsigned char __u8; |
@@ -287,6 +289,58 @@ static int do_pnp_card_entry(const char *filename, | |||
287 | return 1; | 289 | return 1; |
288 | } | 290 | } |
289 | 291 | ||
292 | /* Looks like: pcmcia:mNcNfNfnNpfnNvaNvbNvcNvdN. */ | ||
293 | static int do_pcmcia_entry(const char *filename, | ||
294 | struct pcmcia_device_id *id, char *alias) | ||
295 | { | ||
296 | unsigned int i; | ||
297 | |||
298 | id->manf_id = TO_NATIVE(id->manf_id); | ||
299 | id->card_id = TO_NATIVE(id->card_id); | ||
300 | id->func_id = TO_NATIVE(id->func_id); | ||
301 | id->function = TO_NATIVE(id->function); | ||
302 | id->device_no = TO_NATIVE(id->device_no); | ||
303 | for (i=0; i<4; i++) { | ||
304 | id->prod_id_hash[i] = TO_NATIVE(id->prod_id_hash[i]); | ||
305 | } | ||
306 | |||
307 | strcpy(alias, "pcmcia:"); | ||
308 | ADD(alias, "m", id->match_flags & PCMCIA_DEV_ID_MATCH_MANF_ID, | ||
309 | id->manf_id); | ||
310 | ADD(alias, "c", id->match_flags & PCMCIA_DEV_ID_MATCH_CARD_ID, | ||
311 | id->card_id); | ||
312 | ADD(alias, "f", id->match_flags & PCMCIA_DEV_ID_MATCH_FUNC_ID, | ||
313 | id->func_id); | ||
314 | ADD(alias, "fn", id->match_flags & PCMCIA_DEV_ID_MATCH_FUNCTION, | ||
315 | id->function); | ||
316 | ADD(alias, "pfn", id->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO, | ||
317 | id->device_no); | ||
318 | ADD(alias, "pa", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID1, id->prod_id_hash[0]); | ||
319 | ADD(alias, "pb", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID2, id->prod_id_hash[1]); | ||
320 | ADD(alias, "pc", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID3, id->prod_id_hash[2]); | ||
321 | ADD(alias, "pd", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID4, id->prod_id_hash[3]); | ||
322 | |||
323 | return 1; | ||
324 | } | ||
325 | |||
326 | |||
327 | |||
328 | static int do_of_entry (const char *filename, struct of_device_id *of, char *alias) | ||
329 | { | ||
330 | char *tmp; | ||
331 | sprintf (alias, "of:N%sT%sC%s", | ||
332 | of->name[0] ? of->name : "*", | ||
333 | of->type[0] ? of->type : "*", | ||
334 | of->compatible[0] ? of->compatible : "*"); | ||
335 | |||
336 | /* Replace all whitespace with underscores */ | ||
337 | for (tmp = alias; tmp && *tmp; tmp++) | ||
338 | if (isspace (*tmp)) | ||
339 | *tmp = '_'; | ||
340 | |||
341 | return 1; | ||
342 | } | ||
343 | |||
290 | /* Ignore any prefix, eg. v850 prepends _ */ | 344 | /* Ignore any prefix, eg. v850 prepends _ */ |
291 | static inline int sym_is(const char *symbol, const char *name) | 345 | static inline int sym_is(const char *symbol, const char *name) |
292 | { | 346 | { |
@@ -362,6 +416,13 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
362 | else if (sym_is(symname, "__mod_pnp_card_device_table")) | 416 | else if (sym_is(symname, "__mod_pnp_card_device_table")) |
363 | do_table(symval, sym->st_size, sizeof(struct pnp_card_device_id), | 417 | do_table(symval, sym->st_size, sizeof(struct pnp_card_device_id), |
364 | do_pnp_card_entry, mod); | 418 | do_pnp_card_entry, mod); |
419 | else if (sym_is(symname, "__mod_pcmcia_device_table")) | ||
420 | do_table(symval, sym->st_size, sizeof(struct pcmcia_device_id), | ||
421 | do_pcmcia_entry, mod); | ||
422 | else if (sym_is(symname, "__mod_of_device_table")) | ||
423 | do_table(symval, sym->st_size, sizeof(struct of_device_id), | ||
424 | do_of_entry, mod); | ||
425 | |||
365 | } | 426 | } |
366 | 427 | ||
367 | /* Now add out buffered information to the generated C source */ | 428 | /* Now add out buffered information to the generated C source */ |