diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-01-28 10:57:26 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-02-19 03:51:17 -0500 |
commit | cb80514d9c517cc1d101ef304529a0e9b76b4468 (patch) | |
tree | 25c9203d808ce322f13cdf62c98c29bcc49a69be /scripts/mod/modpost.c | |
parent | 06300b21f4c79fd1578f4b7ca4b314fbab61a383 (diff) |
kbuild: use warn()/fatal() consistent in modpost
modpost.c provides warn() and fatal() - so use them all over the place.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f70ff13d4818..a3c57ec7d54a 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -303,8 +303,7 @@ parse_elf(struct elf_info *info, const char *filename) | |||
303 | sechdrs[sechdrs[i].sh_link].sh_offset; | 303 | sechdrs[sechdrs[i].sh_link].sh_offset; |
304 | } | 304 | } |
305 | if (!info->symtab_start) { | 305 | if (!info->symtab_start) { |
306 | fprintf(stderr, "modpost: %s no symtab?\n", filename); | 306 | fatal("%s has no symtab?\n", filename); |
307 | abort(); | ||
308 | } | 307 | } |
309 | /* Fix endianness in symbols */ | 308 | /* Fix endianness in symbols */ |
310 | for (sym = info->symtab_start; sym < info->symtab_stop; sym++) { | 309 | for (sym = info->symtab_start; sym < info->symtab_stop; sym++) { |
@@ -316,8 +315,7 @@ parse_elf(struct elf_info *info, const char *filename) | |||
316 | return; | 315 | return; |
317 | 316 | ||
318 | truncated: | 317 | truncated: |
319 | fprintf(stderr, "modpost: %s is truncated.\n", filename); | 318 | fatal("%s is truncated.\n", filename); |
320 | abort(); | ||
321 | } | 319 | } |
322 | 320 | ||
323 | void | 321 | void |
@@ -337,8 +335,7 @@ handle_modversions(struct module *mod, struct elf_info *info, | |||
337 | 335 | ||
338 | switch (sym->st_shndx) { | 336 | switch (sym->st_shndx) { |
339 | case SHN_COMMON: | 337 | case SHN_COMMON: |
340 | fprintf(stderr, "*** Warning: \"%s\" [%s] is COMMON symbol\n", | 338 | warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name); |
341 | symname, mod->name); | ||
342 | break; | 339 | break; |
343 | case SHN_ABS: | 340 | case SHN_ABS: |
344 | /* CRC'd symbol */ | 341 | /* CRC'd symbol */ |
@@ -562,8 +559,8 @@ add_versions(struct buffer *b, struct module *mod) | |||
562 | exp = find_symbol(s->name); | 559 | exp = find_symbol(s->name); |
563 | if (!exp || exp->module == mod) { | 560 | if (!exp || exp->module == mod) { |
564 | if (have_vmlinux && !s->weak) | 561 | if (have_vmlinux && !s->weak) |
565 | fprintf(stderr, "*** Warning: \"%s\" [%s.ko] " | 562 | warn("\"%s\" [%s.ko] undefined!\n", |
566 | "undefined!\n", s->name, mod->name); | 563 | s->name, mod->name); |
567 | continue; | 564 | continue; |
568 | } | 565 | } |
569 | s->module = exp->module; | 566 | s->module = exp->module; |
@@ -584,8 +581,7 @@ add_versions(struct buffer *b, struct module *mod) | |||
584 | continue; | 581 | continue; |
585 | } | 582 | } |
586 | if (!s->crc_valid) { | 583 | if (!s->crc_valid) { |
587 | fprintf(stderr, "*** Warning: \"%s\" [%s.ko] " | 584 | warn("\"%s\" [%s.ko] has no CRC!\n", |
588 | "has no CRC!\n", | ||
589 | s->name, mod->name); | 585 | s->name, mod->name); |
590 | continue; | 586 | continue; |
591 | } | 587 | } |