views:

62

answers:

1

How to display beginning sector of each partition in ubuntu ?like in windows there is an API to call disk structure in c/C++ .. any suggestions will be help full.

+2  A: 

Open one of /dev/sd* and read from that.

Ignacio Vazquez-Abrams
i am new to C/C++ programming i know we can display it using fdisk -ul from terminal.But i want to know win32 API like class in linux so can give me idea or code snippet what can be used to display start sector of partition and end sector of partition.
Jagoun
Perhaps study the source code of fdisk or cfdisk?
Nighthawk