Android->auto detecting USB printer
This commit is contained in:
@ -764,7 +764,12 @@ static void handle_generic_device_event(struct uevent *uevent)
|
||||
make_dir(devpath, 0755);
|
||||
snprintf(devpath, sizeof(devpath), "/dev/bus/usb/%03d/%03d", bus_id, device_id);
|
||||
}
|
||||
} else {
|
||||
} else if (!strncmp(uevent->subsystem, "usbmisc", 7)){
|
||||
if(!strncmp(uevent->device_name, "usb/lp",6)) {
|
||||
base = "/dev/usb/";
|
||||
make_dir(base, 0755);
|
||||
}
|
||||
}else {
|
||||
/* ignore other USB events */
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user