开发者

Mac Application - Disable specific USB port

开发者 https://www.devze.com 2023-03-23 17:42 出处:网络
There is开发者_StackOverflow社区 any way to I disable/enable a specific USB Port with my application ?I\'m not aware of any way to do this from user space, and even within the kernel it could be trick

There is开发者_StackOverflow社区 any way to I disable/enable a specific USB Port with my application ?


I'm not aware of any way to do this from user space, and even within the kernel it could be tricky: I think you would need to install a dummy I/O Kit driver which matches all USB devices and/or interfaces. This could be tricky as existing drivers would take precedence, so you'd need to work around that. Once matched, you would check the port in the driver's probe() method and return true if it was one of the disallowed ports. This would stop other drivers from grabbing the device, which would essentially disable it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号