- udev_set_values(&udev, devpath, subsystem, action);
+ action = getenv("ACTION");
+ devpath = getenv("DEVPATH");
+ subsystem = getenv("SUBSYSTEM");
+ /* older kernels passed the SUBSYSTEM only as argument */
+ if (!subsystem && argc == 2)
+ subsystem = argv[1];
+ udev_init_device(&udev, devpath, subsystem);