]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
discover: Include boot priorities in configuration dump
[petitboot] / discover / device-handler.c
index a2713904f01f4f85e30547c5a63ff643b0e46bf6..80187ff49474a186cfb5b7e5bb7bceb0f4209404 100644 (file)
@@ -250,7 +250,7 @@ const char *discover_device_get_param(struct discover_device *device,
 
        list_for_each_entry(&device->params, param, list) {
                if (!strcmp(param->name, name))
-                       return param->name;
+                       return param->value;
        }
        return NULL;
 }
@@ -372,7 +372,8 @@ static int default_timeout(void *arg)
 static bool priority_match(struct boot_priority *prio,
                struct discover_boot_option *opt)
 {
-       return prio->type == opt->device->device->type;
+       return prio->type == opt->device->device->type ||
+               prio->type == DEVICE_TYPE_ANY;
 }
 
 static int default_option_priority(struct discover_boot_option *opt)
@@ -835,16 +836,8 @@ 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_log("couldn't mount device %s: mount failed with rc %d\n",
+                       dev->device_path, rc);
 
        pb_rmdir_recursive(mount_base(), dev->mount_path);
 err_free: