[kernel] r8830 - in dists/trunk/linux-kbuild-2.6: debian src/mod

Bastian Blank waldi at alioth.debian.org
Wed May 30 21:49:11 UTC 2007


Author: waldi
Date: Wed May 30 21:49:10 2007
New Revision: 8830

Log:
* debian/changelog: Update.
* src/mod/modpost.c
  - Don't fail if no module is specified.
  - Use EXIT definitions.


Modified:
   dists/trunk/linux-kbuild-2.6/debian/changelog
   dists/trunk/linux-kbuild-2.6/src/mod/modpost.c

Modified: dists/trunk/linux-kbuild-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-kbuild-2.6/debian/changelog	(original)
+++ dists/trunk/linux-kbuild-2.6/debian/changelog	Wed May 30 21:49:10 2007
@@ -1,8 +1,9 @@
 linux-kbuild-2.6 (2.6.22~rc3-1) UNRELEASED; urgency=low
 
   * New upstream version.
+  * Don't fail if no module is specified.
 
- -- Bastian Blank <waldi at debian.org>  Wed, 30 May 2007 20:48:37 +0200
+ -- Bastian Blank <waldi at debian.org>  Wed, 30 May 2007 23:48:22 +0200
 
 linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low
 

Modified: dists/trunk/linux-kbuild-2.6/src/mod/modpost.c
==============================================================================
--- dists/trunk/linux-kbuild-2.6/src/mod/modpost.c	(original)
+++ dists/trunk/linux-kbuild-2.6/src/mod/modpost.c	Wed May 30 21:49:10 2007
@@ -25,24 +25,29 @@
       case 'w':
         break;
       default:
-        return 1;
+        return EXIT_FAILURE;
     }
   }
 
+  if (optind == argc)
+    return EXIT_SUCCESS;
+
   if (!(file = fopen (argv[optind], "r")))
   {
     fprintf (stderr, "Can't open file\n");
-    return 1;
+    return EXIT_FAILURE;
   }
+
   if (fread (ei, 1, EI_NIDENT, file) != EI_NIDENT)
   {
     fprintf (stderr, "Error: input truncated\n");
-    return 1;
+    return EXIT_FAILURE;
   }
+
   if (memcmp (ei, ELFMAG, SELFMAG) != 0)
   {
     fprintf (stderr, "Error: not ELF\n");
-    return 1;
+    return EXIT_FAILURE;
   }
   switch (ei[EI_DATA]) {
     case ELFDATA2LSB:
@@ -52,7 +57,7 @@
       data = "msb";
       break;
     default:
-      return 1;
+      return EXIT_FAILURE;
   }
   switch (ei[EI_CLASS]) {
     case ELFCLASS32:
@@ -62,7 +67,7 @@
       class = "64";
       break;
     default:
-      return 1;
+      return EXIT_FAILURE;
   }
   snprintf (prog, sizeof prog, "%s.real-%s-%s", argv[0], data, class);
 



More information about the Kernel-svn-changes mailing list