[Libguestfs] [PATCH 3/4] febootstrap/helper/init: Fix wait() error handling

Hilko Bengen bengen at hilluzination.de
Tue May 31 22:43:11 UTC 2011


---
 helper/init.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/helper/init.c b/helper/init.c
index ac71018..40f0e43 100644
--- a/helper/init.c
+++ b/helper/init.c
@@ -228,10 +228,11 @@ insmod (const char *filename)
 
   /* Parent. */
   int status;
-  if (wait (&status) == -1 ||
-      WEXITSTATUS (status) != 0)
+  if (wait (&status) == -1)
     perror ("insmod: wait");
+  else if (WEXITSTATUS (status) != 0)
     /* but ignore the error, some will be because the device is not found */
+    fprintf (stderr, "insmod %s failed\n", filename);
 }
 
 /* Print contents of /proc/uptime. */
-- 
1.7.5.3




More information about the Libguestfs mailing list