]> git.ozlabs.org Git - petitboot/commitdiff
log discover mount failure
authorGeoff Levand <geoffrey.levand@am.sony.com>
Wed, 25 Mar 2009 12:35:53 +0000 (12:35 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 30 Mar 2009 09:20:06 +0000 (20:20 +1100)
Add the status value to the discover mount failure log.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c

index 8a4930e1efd565d8487f88875b26774adddcc882..0f876658b5a2331750ceeced591bfca53e81f042 100644 (file)
@@ -227,8 +227,11 @@ static int mount_device(struct discover_context *ctx)
                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;
@@ -320,7 +323,6 @@ static int handle_add_event(struct device_handler *handler,
 
        rc = mount_device(ctx);
        if (rc) {
-               pb_log("mount_device failed for %s\n", event->device);
                talloc_free(ctx);
                return 0;
        }