|
发表于 2020-8-14 09:25:17
8292 浏览 0 回复
系统自动创建打印机节点/dev/usb/lp0
--- a/system/core/init/devices.cpp
+++ b/system/core/init/devices.cpp
@@ -409,7 +409,20 @@ void DeviceHandler::HandleDeviceEvent(const Uevent& uevent) {
}
} else if (StartsWith(uevent.subsystem, "usb")) {
// ignore other USB events
- return;
+ if (uevent.subsystem == "usbmisc")
+ {
+ if(uevent.device_name=="usb/lp0"){
+
+ devpath = "/dev/" + uevent.device_name;
+ }
+ }else{
+
+ return;
+
+ }
+
+
} else {
devpath = "/dev/" + Basename(uevent.path);
}
|
|
|
|
|
|
|
登录或注册
|