简体   繁体   English

获取内核模块中已挂载文件系统的列表?

[英]Getting a list of mounted file systems in a kernel module?

I'm trying to get a path to the mountpoint of a specific filesystem in a kernel module. 我正在尝试获取内核模块中特定文件系统的挂载点的路径。 In a user-space tool, I could read /proc/mount to do this, but from what I've tried and read, that's not possible in kernel space. 在用户空间工具中,我可以读取/ proc / mount来执行此操作,但是根据我尝试读取的内容,这在内核空间中是不可能的。

How can I achieve this in a kernel module? 如何在内核模块中实现这一目标?

您可以从/ dev /目录获得此文件,也只需在该位置使用grep和sed即可找到正确的安装点。

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

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