diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-02-28 17:16:57 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-04-29 14:31:20 +1000 |
commit | 397dc244bfdc2a57fc3e8fd191b0ef60c8a4b66b (patch) | |
tree | afad1d55a8d2b64eda25f398c686b05dac94d836 /discover/device-handler.h | |
parent | 3b29ff8c2a6489b9517d61c0f63256a1ad0c36f7 (diff) | |
download | talos-petitboot-397dc244bfdc2a57fc3e8fd191b0ef60c8a4b66b.tar.gz talos-petitboot-397dc244bfdc2a57fc3e8fd191b0ef60c8a4b66b.zip |
discover: Add device lookup functions
Add a few functions to find devices by various attributes:
* device_lookup_by_name
* device_lookup_by_path
* device_lookup_by_uuid
* device_lookup_by_label
* device_lookup_by_id
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/device-handler.h')
-rw-r--r-- | discover/device-handler.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/discover/device-handler.h b/discover/device-handler.h index e298fed..9a7cf6d 100644 --- a/discover/device-handler.h +++ b/discover/device-handler.h @@ -45,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); |