main.c | 97 static uint64_t get_size(int devfd) 104 if (!ioctl(devfd, BLKGETSIZE64, &bytes)) 107 if (!ioctl(devfd, BLKGETSIZE, §s)) 109 else if (!fstat(devfd, &st) && st.st_size) 123 static int sysfs_get_offset(int devfd, unsigned long *start) 130 if (fstat(devfd, &st)) 166 int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo) 176 if (!ioctl(devfd, HDIO_GETGEO, geo)) { 178 } else if (!ioctl(devfd, FDGETPRM, &fd_str)) { 213 if (!ioctl(devfd, LOOP_GET_STATUS64, &li64) 1343 int devfd; local 1458 int devfd, rv; local 1511 int devfd; local [all...] |