]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.h
discover: Add device lookup functions
[petitboot] / discover / device-handler.h
index 809f88ee727ac1e16e9891c0714121fc802aa6d0..9a7cf6d07603435508b3b4b46a39818a219d9f94 100644 (file)
@@ -17,6 +17,9 @@ struct discover_device {
        char                    **links;
        int                     n_links;
 
+       char                    *uuid;
+       char                    *label;
+
        char                    *mount_path;
        char                    *device_path;
 };
@@ -42,6 +45,17 @@ void discover_context_add_boot_option(struct discover_context *ctx,
 
 int device_handler_event(struct device_handler *handler, struct event *event);
 
+struct discover_device *device_lookup_by_name(struct device_handler *handler,
+               const char *name);
+struct discover_device *device_lookup_by_path(struct device_handler *handler,
+               const char *path);
+struct discover_device *device_lookup_by_uuid(struct device_handler *handler,
+               const char *uuid);
+struct discover_device *device_lookup_by_label(struct device_handler *handler,
+               const char *label);
+struct discover_device *device_lookup_by_id(struct device_handler *handler,
+               const char *id);
+
 void device_handler_boot(struct device_handler *handler,
                struct boot_command *cmd);