X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fdevice-handler.h;h=809f88ee727ac1e16e9891c0714121fc802aa6d0;hp=796b328649bdcfc515d0e8d338d0109a38f5ec5d;hb=92806cf6bc15f680f75879288df12ea9a87e4608;hpb=d7ce19907ff585e7fb6b950a40bd638d49c96a27 diff --git a/discover/device-handler.h b/discover/device-handler.h index 796b328..809f88e 100644 --- a/discover/device-handler.h +++ b/discover/device-handler.h @@ -4,23 +4,31 @@ #include struct device_handler; +struct discover_device; struct discover_server; +struct boot_option; +struct boot_command; struct event; struct device; +struct discover_device { + struct device *device; + + char **links; + int n_links; + + char *mount_path; + char *device_path; +}; + struct discover_context { - char *id; - char *device_path; - char *mount_path; - struct event *event; - struct device *device; - char **links; - int n_links; - - struct list_item list; + struct event *event; + struct discover_device *device; + struct list boot_options; }; -struct device_handler *device_handler_init(struct discover_server *server); +struct device_handler *device_handler_init(struct discover_server *server, + int dry_run); void device_handler_destroy(struct device_handler *devices); @@ -28,6 +36,13 @@ int device_handler_get_device_count(const struct device_handler *handler); const struct device *device_handler_get_device( const struct device_handler *handler, unsigned int index); +struct device *discover_context_device(struct discover_context *ctx); +void discover_context_add_boot_option(struct discover_context *ctx, + struct boot_option *opt); + int device_handler_event(struct device_handler *handler, struct event *event); +void device_handler_boot(struct device_handler *handler, + struct boot_command *cmd); + #endif /* _DEVICE_HANDLER_H */