Need libc APIs to access disk geometry and partitioning related info

强颜欢笑 提交于 2020-01-06 15:12:40

问题


I am working on a new project, which relates to creating drive images for backup.

As a part of it, i need to write code which can give much useful information related to disk geometry - cylinders, no. of sectors, partitions, and file systems and even drive specific info, like which partition is present on which drive. i need some APIs.

If you can post a code too in addition to APIs that will be great.

P.S: Something similar to what Novell - Zenworks (Imaging) does


回答1:


There is no glibc facility for that. Use libblkid.



来源:https://stackoverflow.com/questions/9478519/need-libc-apis-to-access-disk-geometry-and-partitioning-related-info

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!