X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fdevice-handler.c;h=f1270c8ca660b7c771f0e08023e4559345f1e5bc;hb=675eb751ff84e80f286da808daa931a84baf9302;hp=94a3f1c847f09fd3c26e22c88edbfb42ac365924;hpb=37feda62bd2835eabc779d275301a9b763521f7a;p=petitboot diff --git a/discover/device-handler.c b/discover/device-handler.c index 94a3f1c..f1270c8 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -1563,6 +1563,10 @@ static void device_handler_update_lang(const char *lang) static int device_handler_init_sources(struct device_handler *handler) { /* init our device sources: udev, network and user events */ + handler->user_event = user_event_init(handler, handler->waitset); + if (!handler->user_event) + return -1; + handler->network = network_init(handler, handler->waitset, handler->dry_run); if (!handler->network) @@ -1572,10 +1576,6 @@ static int device_handler_init_sources(struct device_handler *handler) if (!handler->udev) return -1; - handler->user_event = user_event_init(handler, handler->waitset); - if (!handler->user_event) - return -1; - return 0; }