-static int udev_hotplug(int argc, char **argv)
-{
- char *devpath;
- char *subsystem;
- int retval = -EINVAL;
- int i;
- struct sigaction act;
-
- devpath = argv[1];
- if (!devpath) {
- dbg("no devpath?");
- goto exit;
- }
- dbg("looking at '%s'", devpath);
-
- /* we only care about class devices and block stuff */
- if (!strstr(devpath, "class") &&
- !strstr(devpath, "block")) {
- dbg("not a block or class device");
- goto exit;
- }
-
- /* skip blacklisted subsystems */
- subsystem = argv[1];
- i = 0;
- while (subsystem_blacklist[i][0] != '\0') {
- if (strcmp(subsystem, subsystem_blacklist[i]) == 0) {
- dbg("don't care about '%s' devices", subsystem);
- goto exit;
- }
- i++;