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
There is no glibc facility for that. Use libblkid.