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) {
if (dev == NULL)
return -1;
- udev = udev_device_init();
+ udev = udev_device_init(NULL);
if (udev == NULL)
return -1;
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);