Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a11665945d510e1a4df8dc44dc3668b01945ade
Commit:     2a11665945d510e1a4df8dc44dc3668b01945ade
Parent:     63431e75691c410819023ab0e6cd047cbfcf64e2
Author:     Matthew Wilcox <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 7 05:35:32 2006 -0600
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Wed May 2 20:58:08 2007 +0200

    kbuild: distinguish between errors and warnings in modpost
    
    Some of modpost's warnings are fatal, and some are not.  Adopt the
    compiler distinction between errors and warnings by calling merror()
    for fatal diagnostics and warn() for non-fatal ones.
    merror() was used as replacemtn for error() to avoid clash with glibc
    
    Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/mod/modpost.c |   22 +++++++++++++++++++---
 scripts/mod/modpost.h |    1 +
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 5f2ecd5..b10b69b 100644
--- a/scripts/mod/modpost.c
+++ b/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/scripts/mod/modpost.h b/scripts/mod/modpost.h
index d398c61..0858caa 100644
--- a/scripts/mod/modpost.h
+++ b/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, ...);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to