PDA

View Full Version : How to get partition information?



twin_cylinder
05-08-2004, 05:12 PM
Hi,

I noticed that there are icons on the desk top that let you mount the window partions by clicking on it. How does one get that information in C program? I know I can traverse /proc/ide directory to pull out file names starting with "hd" or look in /proc/partiontable. Is there a better way to do it? I looked at fdisk code, it has list_partion call. There seem to be a lot of stuff happening before it gets to that stage. "fdisk" man page says it looks in the partiontable and other places. I'm not sure what is the best way...

Thanks,
Jae