]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
process: Cancel all asynchronous jobs on reinit
[petitboot] / discover / device-handler.c
index a3891c4564b62644fd5b51ac2d740b4ba1058ac1..3cf7edff082d9f6f880ccdd19c18fa698490cbce 100644 (file)
@@ -351,6 +351,15 @@ void device_handler_reinit(struct device_handler *handler)
        unsigned int i;
 
        device_handler_cancel_default(handler);
+       /* Cancel any pending non-default boot */
+       if (handler->pending_boot) {
+               boot_cancel(handler->pending_boot);
+               handler->pending_boot = NULL;
+               handler->pending_boot_is_default = false;
+       }
+
+       /* Cancel any remaining async jobs */
+       process_stop_async_all();
 
        /* free unresolved boot options */
        list_for_each_entry_safe(&handler->unresolved_boot_options,