X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udevstart.c;h=e5ce7af0307eefa214a685df3833d2ae5b104c13;hp=fdb2ae38081ad495629c2f03ce34f295710de61c;hb=66c2bc212087d02faf77520b52ef6177d5c351fa;hpb=a9bd2ed84a7b0871c281adc8226f12ae46da4de0 diff --git a/udevstart.c b/udevstart.c index fdb2ae380..e5ce7af03 100644 --- a/udevstart.c +++ b/udevstart.c @@ -108,6 +108,7 @@ static int add_device(const char *devpath) { struct sysfs_device *dev; struct udevice *udev; + int retval = 0; /* clear and set environment for next event */ clearenv(); @@ -146,14 +147,12 @@ static int add_device(const char *devpath) dbg("device event will be ignored"); goto exit; } - if (udev->name[0] == '\0') { - dbg("device node creation supressed"); - goto run; - } + if (udev->name[0] != '\0') + retval = udev_add_device(udev); + else + info("device node creation supressed"); - udev_add_device(udev); -run: - if (udev_run && !list_empty(&udev->run_list)) { + if (retval == 0 && udev_run) { struct name_entry *name_loop; dbg("executing run list"); @@ -169,9 +168,9 @@ run: } } } + exit: udev_device_cleanup(udev); - return 0; }