summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-01-28 16:57:26 +0100
committerSam Ravnborg <sam@mars.ravnborg.org>2006-02-19 09:51:17 +0100
commitcb80514d9c517cc1d101ef304529a0e9b76b4468 (patch)
tree25c9203d808ce322f13cdf62c98c29bcc49a69be /scripts/mod/modpost.c
parent06300b21f4c79fd1578f4b7ca4b314fbab61a383 (diff)
downloadlwn-cb80514d9c517cc1d101ef304529a0e9b76b4468.tar.gz
lwn-cb80514d9c517cc1d101ef304529a0e9b76b4468.zip
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.c16
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)
sechdrs[sechdrs[i].sh_link].sh_offset;
}
if (!info->symtab_start) {
- fprintf(stderr, "modpost: %s no symtab?\n", filename);
- abort();
+ fatal("%s has no symtab?\n", filename);
}
/* Fix endianness in symbols */
for (sym = info->symtab_start; sym < info->symtab_stop; sym++) {
@@ -316,8 +315,7 @@ parse_elf(struct elf_info *info, const char *filename)
return;
truncated:
- fprintf(stderr, "modpost: %s is truncated.\n", filename);
- abort();
+ fatal("%s is truncated.\n", filename);
}
void
@@ -337,8 +335,7 @@ handle_modversions(struct module *mod, struct elf_info *info,
switch (sym->st_shndx) {
case SHN_COMMON:
- fprintf(stderr, "*** Warning: \"%s\" [%s] is COMMON symbol\n",
- symname, mod->name);
+ warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name);
break;
case SHN_ABS:
/* CRC'd symbol */
@@ -562,8 +559,8 @@ add_versions(struct buffer *b, struct module *mod)
exp = find_symbol(s->name);
if (!exp || exp->module == mod) {
if (have_vmlinux && !s->weak)
- fprintf(stderr, "*** Warning: \"%s\" [%s.ko] "
- "undefined!\n", s->name, mod->name);
+ warn("\"%s\" [%s.ko] undefined!\n",
+ s->name, mod->name);
continue;
}
s->module = exp->module;
@@ -584,8 +581,7 @@ add_versions(struct buffer *b, struct module *mod)
continue;
}
if (!s->crc_valid) {
- fprintf(stderr, "*** Warning: \"%s\" [%s.ko] "
- "has no CRC!\n",
+ warn("\"%s\" [%s.ko] has no CRC!\n",
s->name, mod->name);
continue;
}