Patchwork [07/18] petitboot: log discover mount failure

login
register
mail settings
Submitter Geoff Levand
Date March 25, 2009, 10:35 p.m.
Message ID <20090325223547.288969550@am.sony.com>>
Download mbox | patch
Permalink /patch/25112/
State Accepted
Headers show

Comments

Geoff Levand - March 25, 2009, 10:35 p.m.
Add the status value to the discover mount failure log.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
 discover/device-handler.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -223,8 +223,11 @@  static int mount_device(struct discover_
 		goto out_rmdir;
 	}
 
-	if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
+	if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
+		pb_log("%s: mount failed (%d): %s\n", __func__,
+			WEXITSTATUS(status), ctx->event->device);
 		goto out_rmdir;
+	}
 
 	setup_device_links(ctx);
 	return 0;
@@ -316,7 +319,6 @@  static int handle_add_event(struct devic
 
 	rc = mount_device(ctx);
 	if (rc) {
-		pb_log("mount_device failed for %s\n", event->device);
 		talloc_free(ctx);
 		return 0;
 	}