]> git.ozlabs.org Git - petitboot/commitdiff
discover: don't retry mount without ro option
authorJeremy Kerr <jk@ozlabs.org>
Fri, 7 Mar 2014 01:05:00 +0000 (09:05 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 7 Mar 2014 01:05:00 +0000 (09:05 +0800)
Currently, if the read-only mount fails during device discovery, we
retry without the '-o ro' option. This was originally due to the
read-only mount failing when a device was already mounted elsewhere.

Since we check for exsiting mounts now, we can drop this retry.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c

index f1845a9479f4de878bfab4f5d6dcecbfcb1e69b1..eaa85de166ce4228b707046ce3e344ec62c1f17d 100644 (file)
@@ -836,17 +836,6 @@ static int mount_device(struct discover_device *dev)
                return 0;
        }
 
-       /* Retry mount without ro option. */
-       rc = process_run_simple(dev, pb_system_apps.mount,
-                       dev->device_path, dev->mount_path, NULL);
-
-       if (!rc) {
-               dev->mounted = true;
-               dev->mounted_rw = true;
-               dev->unmount = true;
-               return 0;
-       }
-
        pb_rmdir_recursive(mount_base(), dev->mount_path);
 err_free:
        talloc_free(dev->mount_path);