X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udevstart.c;h=0d9b4f4004513cc970ca6fb77f2e0a929207f727;hp=8f8342ff48f80a19d841b3c83f85e45e47cbd95a;hb=55c1768ca1aff74b52644b5a96cae868100254a8;hpb=37854ffc9ae60da66d5525225c93eb1754a780bb diff --git a/udevstart.c b/udevstart.c index 8f8342ff4..0d9b4f400 100644 --- a/udevstart.c +++ b/udevstart.c @@ -108,7 +108,7 @@ static int add_device(const char *devpath) { struct sysfs_device *dev; struct udevice *udev; - int retval; + int retval = 0; /* clear and set environment for next event */ clearenv(); @@ -130,7 +130,6 @@ static int add_device(const char *devpath) /* override built-in sysfs device */ udev->dev = dev; strcpy(udev->action, "add"); - udev->devt = udev_device_get_devt(udev); if (strcmp(udev->dev->subsystem, "net") != 0) { udev->devt = udev_device_get_devt(udev); @@ -148,13 +147,11 @@ static int add_device(const char *devpath) goto exit; } if (udev->name[0] != '\0') - retval = udev_add_device(udev); - else { + retval = udev_device_event(&rules, udev); + else info("device node creation supressed"); - goto exit; - } - if (retval == 0 && !udev->ignore_device && udev_run) { + if (retval == 0 && udev_run) { struct name_entry *name_loop; dbg("executing run list");