diff options
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r-- | discover/device-handler.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c index 2888914..0783181 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -201,11 +201,18 @@ static int mount_device(struct discover_context *ctx) argv[4] = "ro"; argv[5] = NULL; - if (pb_run_cmd(argv, 1)) - argv[3] = NULL; /* try without ro */ + if (pb_run_cmd(argv, 1)) { - if (pb_run_cmd(argv, 1)) - goto out_rmdir; + /* Retry mount without ro option. */ + + argv[0] = MOUNT_BIN; + argv[1] = ctx->device_path; + argv[2] = ctx->mount_path; + argv[3] = NULL; + + if (pb_run_cmd(argv, 1)) + goto out_rmdir; + } setup_device_links(ctx); return 0; |