X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevstart.c;h=66b96a218654edffefb7e15bbdcfd719cfd6363f;hb=e2ecb34ffd4fd8b0d31a65ec0c59dc4f8023ad6d;hp=a381c411a80f437157ed38a622723f52ba531041;hpb=31de3a2ba18ffa011f5054016ccc4a500cbe0cc3;p=elogind.git diff --git a/udevstart.c b/udevstart.c index a381c411a..66b96a218 100644 --- a/udevstart.c +++ b/udevstart.c @@ -68,7 +68,7 @@ static int device_list_insert(const char *path, struct list_head *device_list) struct device *new_device; const char *devpath = &path[strlen(sysfs_path)]; - dbg("insert: '%s'\n", devpath); + dbg("insert: '%s'", devpath); list_for_each_entry(loop_device, device_list, node) { if (strcmp(loop_device->path, devpath) > 0) { @@ -148,22 +148,8 @@ static int add_device(const char *devpath) else info("device node creation supressed"); - if (retval == 0 && udev_run) { - struct name_entry *name_loop; - - dbg("executing run list"); - list_for_each_entry(name_loop, &udev->run_list, node) { - if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0) - pass_env_to_socket(&name_loop->name[strlen("socket:")], udev->dev->devpath, "add"); - else { - char program[PATH_SIZE]; - - strlcpy(program, name_loop->name, sizeof(program)); - udev_rules_apply_format(udev, program, sizeof(program)); - run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); - } - } - } + if (retval == 0 && udev_run) + udev_rules_run(udev); exit: udev_device_cleanup(udev);