From b0403e184bce7339ddaddce61b3acccd2f0f0617 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Sat, 7 Oct 2006 05:35:32 -0600 Subject: [PATCH] --- yaml --- r: 54132 b: refs/heads/master c: 2a11665945d510e1a4df8dc44dc3668b01945ade h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/mod/modpost.c | 22 +++++++++++++++++++--- trunk/scripts/mod/modpost.h | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index cdb65dd26ae4..9ecc39d71b7b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 63431e75691c410819023ab0e6cd047cbfcf64e2 +refs/heads/master: 2a11665945d510e1a4df8dc44dc3668b01945ade diff --git a/trunk/scripts/mod/modpost.c b/trunk/scripts/mod/modpost.c index 5f2ecd51bde3..b10b69b56a31 100644 --- a/trunk/scripts/mod/modpost.c +++ b/trunk/scripts/mod/modpost.c @@ -55,6 +55,17 @@ void warn(const char *fmt, ...) va_end(arglist); } +void merror(const char *fmt, ...) +{ + va_list arglist; + + fprintf(stderr, "ERROR: "); + + va_start(arglist, fmt); + vfprintf(stderr, fmt, arglist); + va_end(arglist); +} + static int is_vmlinux(const char *modname) { const char *myname; @@ -1307,9 +1318,14 @@ static int add_versions(struct buffer *b, struct module *mod) exp = find_symbol(s->name); if (!exp || exp->module == mod) { if (have_vmlinux && !s->weak) { - warn("\"%s\" [%s.ko] undefined!\n", - s->name, mod->name); - err = warn_unresolved ? 0 : 1; + if (warn_unresolved) { + warn("\"%s\" [%s.ko] undefined!\n", + s->name, mod->name); + } else { + merror("\"%s\" [%s.ko] undefined!\n", + s->name, mod->name); + err = 1; + } } continue; } diff --git a/trunk/scripts/mod/modpost.h b/trunk/scripts/mod/modpost.h index d398c61e55ef..0858caa9c03f 100644 --- a/trunk/scripts/mod/modpost.h +++ b/trunk/scripts/mod/modpost.h @@ -145,3 +145,4 @@ void release_file(void *file, unsigned long size); void fatal(const char *fmt, ...); void warn(const char *fmt, ...); +void merror(const char *fmt, ...);