discover/device-handler: Process queue after device added
[petitboot] / discover / device-handler.c
index 48bfa0e237cfd410415d83a265fbbc0bed5a2284..a3891c4564b62644fd5b51ac2d740b4ba1058ac1 100644 (file)
@@ -1039,8 +1039,6 @@ int device_handler_discover(struct device_handler *handler,
                _("Processing new %s device"),
                device_type_display_name(dev->device->type));
 
-       process_boot_option_queue(handler);
-
        /* create our context */
        ctx = device_handler_discover_context_create(handler, dev);
 
@@ -1058,6 +1056,7 @@ int device_handler_discover(struct device_handler *handler,
        /* add discovered stuff to the handler */
        device_handler_discover_context_commit(handler, ctx);
 
+       process_boot_option_queue(handler);
 out:
        talloc_unlink(handler, ctx);