Sebastian Lackner sebastian@fds-team.de writes:
@@ -178,6 +273,13 @@ NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry driver->MajorFunction[IRP_MJ_PNP] = common_pnp_dispatch;
build_initial_deviceset();
- if (!CreateThread(NULL, 0, deviceloop_thread, NULL, 0, NULL))
- {
ERR("Unable to create udev device thread\n");
return STATUS_UNSUCCESSFUL;
Wouldn't it make sense to proceed anyway? The initial device set could still be working properly (and, you are not cleaning up already added drivers here).
Actually, you probably want to load the initial device set from the thread, since it has to be done after setting up the monitoring.