Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 linux 中使用 c/c++(并且没有 d-bus)获取特定设备的标签。问题是我不能只打开设备并读取它的信息(对于 extN,很容易从设备获取标签),因为从 /dev/xxx 读取需要 root 权限。
我认为现在在大多数发行版中你都有
/dev/disk/by-label/
其中充满了指向真实设备的符号链接。