Linux在C ++中禁用USB端口帮助 [英] Linux disable usb port Help in C++
本文介绍了Linux在C ++中禁用USB端口帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要在连接USB端口时禁用它.
我尝试了sys/bus/usb/devices/power/level = suspend,但仍然可以看到该USB设备并可以访问该USB设备.请帮助我停止访问连接到Linux系统的特定USB设备.
我也尝试了ioperm()
,但找不到USB端口号.这是必需的.我正在尝试通过C ++编程来实现.
I want to disallow usb port when it is connected.
I tried sys/bus/usb/devices/power/level=suspend but still, I can see that usb device and have access to that usb device. Please help me to stop access to a particular usb device which is connected to Linux system.
I also tried ioperm()
but I cannot find usb port no. which is required for it. I am trying to do this by C++ programming.
推荐答案
尝试libusb http://www.libusb.org/
了解UDEV http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
try libusb http://www.libusb.org/
learn UDEV http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
这篇关于Linux在C ++中禁用USB端口帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文