projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
784163c
)
Fix device mount retry
author
Geoff Levand
<geoff@infradead.org>
Tue, 27 Mar 2012 03:16:37 +0000
(20:16 -0700)
committer
Geoff Levand
<geoff@infradead.org>
Tue, 27 Mar 2012 03:16:37 +0000
(20:16 -0700)
Signed-off-by: Geoff Levand <geoff@infradead.org>
discover/device-handler.c
patch
|
blob
|
history
diff --git
a/discover/device-handler.c
b/discover/device-handler.c
index 28889144c8f0285c3f90b0e5dd4dc4650c6f0a6f..0783181147edab9f0f8c6b7de9fa2ea35c516cb8 100644
(file)
--- 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;