discover: populate sysinfo with block devices
[petitboot] / discover / device-handler.c
index 725e491d1f6f9c87d11f1918826b049e0ba76885..9033c4fdfb8d3162417ed332e415b6446d33df8e 100644 (file)
@@ -23,6 +23,7 @@
 #include "parser.h"
 #include "resource.h"
 #include "paths.h"
+#include "sysinfo.h"
 #include "boot.h"
 
 struct device_handler {
@@ -602,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);