简体   繁体   English

usb笔式驱动器模块

[英]module for usb pen drive

I am making a module to do some basic stuff in my pen drive following the example here . 我正在制作一个模块,按照这里的例子在我的笔式驱动器中做一些基本的东西。 its stating that the usb storage(in my case pen drive) device uses usb-storage driver . 它声称usb存储(在我的情况下是笔式驱动器)设备使用usb存储驱动程序。 I saw in hardware info that its usb_storage(which is same as usb-storage as when i do rmmod usb -storage it states that ERROR: Module usb_storage does not exist in /proc/modules) . 我在硬件信息中看到它的usb_storage(与usb-storage一样,当我执行rmmod usb -storage时它表明ERROR:模块usb_storage在/ proc / modules中不存在)。 I have done even lsmod with and without device its not showing any module name usb-storage. 我甚至完成了带有和不带设备的lsmod,它没有显示任何模块名称usb-storage。

My doubt is simple how to know which module controles which device and i know it could be unloaded by rmmod (module name). 我很怀疑如何知道哪个模块控制哪个设备,我知道它可以通过rmmod(模块名称)卸载。

Assuming that your kernel actually has usb-storage support this means the module is built in to the kernel and cannot be removed. 假设您的内核实际上具有usb-storage支持,这意味着该模块内置于内核中,无法删除。

Try rebuilding your kernel after changing the usb-storage support to be built as a module, rather than directly into the kernel. 在将usb-storage支持更改为构建为模块之后尝试重建内核,而不是直接进入内核。

There should be no problem removing the module if you are the Super user. 如果您是超级用户,则删除模块应该没有问题。 Otherwise, change to super user then try to remove it. 否则,更改为超级用户然后尝试删除它。 It can be done by sudo su command. 它可以通过sudo su命令完成。

And for the list of modules being used, you can view the device log by dmesg and check out. 对于正在使用的模块列表,您可以通过dmesg查看设备日志并查看。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM