+ /* name, create node, store in db */
+ retval = udev_add_device(&udev, class_dev);
+
+ sysfs_close_class_device(class_dev);
+ } else if (strcmp(action, "remove") == 0) {
+ /* possibly remove a node */
+ dbg("udev remove");
+
+ /* skip subsystems without "dev" */
+ if (subsystem_expect_no_dev(udev.subsystem)) {
+ dbg("don't care about '%s' devices", udev.subsystem);
+ goto hotplug;
+ }
+
+ /* get node from db, remove db-entry, delete created node */
+ retval = udev_remove_device(&udev);
+ }
+
+ /* run dev.d/ scripts if we created/deleted a node or changed a netif name */
+ if (udev.devname[0] != '\0') {
+ setenv("DEVNAME", udev.devname, 1);
+ if (udev_dev_d)
+ udev_multiplex_directory(&udev, DEVD_DIR, DEVD_SUFFIX);
+ }
+ } else if ((strncmp(devpath, "/devices/", 9) == 0)) {
+ if (strcmp(action, "add") == 0) {
+ /* wait for sysfs */
+ dbg("devices add");
+
+ snprintf(path, SYSFS_PATH_MAX, "%s%s", sysfs_path, devpath);
+ devices_dev = wait_devices_device_open(path);
+ if (!devices_dev) {
+ dbg("devices device unavailable (probably remove has beaten us)");
+ goto hotplug;
+ }
+ dbg("devices device opened '%s'", path);
+
+ wait_for_devices_device(devices_dev, &error);
+
+ sysfs_close_device(devices_dev);
+ } else if (strcmp(action, "remove") == 0) {
+ dbg("devices remove");
+ }
+ } else {
+ dbg("unhandled");