aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/mod/modpost.c22
-rw-r--r--scripts/mod/modpost.h1
2 files changed, 20 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 5f2ecd51bde3..b10b69b56a31 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -55,6 +55,17 @@ void warn(const char *fmt, ...)
55 va_end(arglist); 55 va_end(arglist);
56} 56}
57 57
58void merror(const char *fmt, ...)
59{
60 va_list arglist;
61
62 fprintf(stderr, "ERROR: ");
63
64 va_start(arglist, fmt);
65 vfprintf(stderr, fmt, arglist);
66 va_end(arglist);
67}
68
58static int is_vmlinux(const char *modname) 69static int is_vmlinux(const char *modname)
59{ 70{
60 const char *myname; 71 const char *myname;
@@ -1307,9 +1318,14 @@ static int add_versions(struct buffer *b, struct module *mod)
1307 exp = find_symbol(s->name); 1318 exp = find_symbol(s->name);
1308 if (!exp || exp->module == mod) { 1319 if (!exp || exp->module == mod) {
1309 if (have_vmlinux && !s->weak) { 1320 if (have_vmlinux && !s->weak) {
1310 warn("\"%s\" [%s.ko] undefined!\n", 1321 if (warn_unresolved) {
1311 s->name, mod->name); 1322 warn("\"%s\" [%s.ko] undefined!\n",
1312 err = warn_unresolved ? 0 : 1; 1323 s->name, mod->name);
1324 } else {
1325 merror("\"%s\" [%s.ko] undefined!\n",
1326 s->name, mod->name);
1327 err = 1;
1328 }
1313 } 1329 }
1314 continue; 1330 continue;
1315 } 1331 }
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index d398c61e55ef..0858caa9c03f 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -145,3 +145,4 @@ void release_file(void *file, unsigned long size);
145 145
146void fatal(const char *fmt, ...); 146void fatal(const char *fmt, ...);
147void warn(const char *fmt, ...); 147void warn(const char *fmt, ...);
148void merror(const char *fmt, ...);