static char *removable_buses[] = { "usb", "firewire", 0 };
char *devname;
char *devpath;
- int i;
+ char *bus;
devname = get_property_value(props, "DEVNAME");
if(is_in_array(allowed, devname))
if(is_removable(devpath))
return 1;
- for(i=0; removable_buses[i]; ++i)
- if(match_property_value(props, "ID_BUS", removable_buses[i]))
- return 1;
+ bus = get_property_value(props, "ID_BUS");
+ if(is_in_array(removable_buses, bus))
+ return 1;
return check_buses(devpath, removable_buses);
}