- /* skip blacklisted subsystems */
- subsystem = main_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;
+ /* remove sysfs_path if given */
+ if (strncmp(argv[1], sysfs_path, strlen(sysfs_path)) == 0)
+ devpath = argv[1] + strlen(sysfs_path);
+ else
+ if (argv[1][0] != '/') {
+ /* prepend '/' if missing */
+ strfieldcpy(temp, "/");
+ strfieldcat(temp, argv[1]);
+ devpath = temp;
+ } else {
+ devpath = argv[1];