标签: macos bsd
我有一个像“/ Volumes / Something”这样的挂载点路径,我已经知道它是挂载的本地卷的根目录。我需要弄清楚在该目录中安装的卷的BSD块设备节点名称,例如“disk1s1”。关于如何挖掘这个问题的任何建议?我也不介意其他一些信息,如设备总大小,但我已经有办法知道它如果我知道一个块设备名称。
谢谢。
答案 0 :(得分:1)
使用statfs系统调用。看http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/statfs.2.html
statfs