diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:43:49 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:43:49 -0400 |
commit | 1d6ae775d7a948c9575658eb41184fd2e506c0df (patch) | |
tree | 8128a28e89d82f13bb8e3a2160382240c66e2816 /scripts/mod | |
parent | 739cdbf1d8f0739b80035b80d69d871e33749b86 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/file2alias.c | 19 | ||||
-rw-r--r-- | scripts/mod/sumversion.c | 8 |
2 files changed, 23 insertions, 4 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 5180405c1a84..d8ee38aede26 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -341,6 +341,22 @@ static int do_of_entry (const char *filename, struct of_device_id *of, char *ali | |||
341 | return 1; | 341 | return 1; |
342 | } | 342 | } |
343 | 343 | ||
344 | static int do_vio_entry(const char *filename, struct vio_device_id *vio, | ||
345 | char *alias) | ||
346 | { | ||
347 | char *tmp; | ||
348 | |||
349 | sprintf(alias, "vio:T%sS%s", vio->type[0] ? vio->type : "*", | ||
350 | vio->compat[0] ? vio->compat : "*"); | ||
351 | |||
352 | /* Replace all whitespace with underscores */ | ||
353 | for (tmp = alias; tmp && *tmp; tmp++) | ||
354 | if (isspace (*tmp)) | ||
355 | *tmp = '_'; | ||
356 | |||
357 | return 1; | ||
358 | } | ||
359 | |||
344 | /* Ignore any prefix, eg. v850 prepends _ */ | 360 | /* Ignore any prefix, eg. v850 prepends _ */ |
345 | static inline int sym_is(const char *symbol, const char *name) | 361 | static inline int sym_is(const char *symbol, const char *name) |
346 | { | 362 | { |
@@ -422,6 +438,9 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
422 | else if (sym_is(symname, "__mod_of_device_table")) | 438 | else if (sym_is(symname, "__mod_of_device_table")) |
423 | do_table(symval, sym->st_size, sizeof(struct of_device_id), | 439 | do_table(symval, sym->st_size, sizeof(struct of_device_id), |
424 | do_of_entry, mod); | 440 | do_of_entry, mod); |
441 | else if (sym_is(symname, "__mod_vio_device_table")) | ||
442 | do_table(symval, sym->st_size, sizeof(struct vio_device_id), | ||
443 | do_vio_entry, mod); | ||
425 | 444 | ||
426 | } | 445 | } |
427 | 446 | ||
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 1112347245c0..43271a1ca01e 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c | |||
@@ -252,9 +252,9 @@ static int parse_comment(const char *file, unsigned long len) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | /* FIXME: Handle .s files differently (eg. # starts comments) --RR */ | 254 | /* FIXME: Handle .s files differently (eg. # starts comments) --RR */ |
255 | static int parse_file(const signed char *fname, struct md4_ctx *md) | 255 | static int parse_file(const char *fname, struct md4_ctx *md) |
256 | { | 256 | { |
257 | signed char *file; | 257 | char *file; |
258 | unsigned long i, len; | 258 | unsigned long i, len; |
259 | 259 | ||
260 | file = grab_file(fname, &len); | 260 | file = grab_file(fname, &len); |
@@ -332,7 +332,7 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md) | |||
332 | Sum all files in the same dir or subdirs. | 332 | Sum all files in the same dir or subdirs. |
333 | */ | 333 | */ |
334 | while ((line = get_next_line(&pos, file, flen)) != NULL) { | 334 | while ((line = get_next_line(&pos, file, flen)) != NULL) { |
335 | signed char* p = line; | 335 | char* p = line; |
336 | if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) { | 336 | if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) { |
337 | check_files = 1; | 337 | check_files = 1; |
338 | continue; | 338 | continue; |
@@ -458,7 +458,7 @@ out: | |||
458 | close(fd); | 458 | close(fd); |
459 | } | 459 | } |
460 | 460 | ||
461 | static int strip_rcs_crap(signed char *version) | 461 | static int strip_rcs_crap(char *version) |
462 | { | 462 | { |
463 | unsigned int len, full_len; | 463 | unsigned int len, full_len; |
464 | 464 | ||