一、获得设备几何参数:磁头数、扇区数、柱面数 /* including <linux/hdreg.h> also fails */ struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; }; #define HDIO_GETGEO 0x0301 /* get device geometry */ ioctl (dev, HDIO_GETGEO, &geometry) |
|