X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fdevice-handler.c;h=9033c4fdfb8d3162417ed332e415b6446d33df8e;hb=d2668cb8a8b9f5ded7b36217408e688ebc49442a;hp=6fa14f9dd07ffb8c82d9df94c3344a12ca3d9ff5;hpb=9239fd1ec121fc6c6eda49ef5c2dab081a026785;p=petitboot diff --git a/discover/device-handler.c b/discover/device-handler.c index 6fa14f9..9033c4f 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -1,4 +1,3 @@ - #include #include #include @@ -24,6 +23,7 @@ #include "parser.h" #include "resource.h" #include "paths.h" +#include "sysinfo.h" #include "boot.h" struct device_handler { @@ -603,6 +603,10 @@ int device_handler_discover(struct device_handler *handler, if (rc) goto out; + /* add this device to our system info */ + system_info_register_blockdev(dev->device->id, dev->uuid, + dev->mount_path); + /* run the parsers. This will populate the ctx's boot_option list. */ iterate_parsers(ctx); @@ -717,6 +721,13 @@ void device_handler_cancel_default(struct device_handler *handler) discover_server_notify_boot_status(handler->server, &status); } +void device_handler_update_config(struct device_handler *handler, + struct config *config) +{ + config_set(config); + discover_server_notify_config(handler->server, config); +} + #ifndef PETITBOOT_TEST static bool check_existing_mount(struct discover_device *dev) {