Lines Matching refs:devfd
48 static void scandisk(char *device, int devfd, int writeflag);
71 int devfd; /* device file descriptor */ in main() local
129 if ((devfd = open(device, O_RDWR)) == -1) { in main()
136 if ((ioctl(devfd, DKIOCGGEOM, &dkg)) == -1) { in main()
143 if ((ioctl(devfd, DKIOCEXTPARTINFO, &extpartinfo)) == 0) { in main()
147 if ((ioctl(devfd, DKIOCPARTINFO, &part_info)) == 0) { in main()
158 scandisk(device, devfd, do_scan); in main()
169 scandisk(char *device, int devfd, int writeflag) in scandisk() argument
182 if ((ioctl(devfd, DKIOCGMEDIAINFO, &mediainfo)) == 0) { in scandisk()
252 if (llseek(devfd, cursec * sector_size, 0) == -1) { in scandisk()
267 if (write(devfd, verbuf, trksiz) != trksiz) { in scandisk()
275 if (llseek(devfd, tmpsec * sector_size, in scandisk()
285 if (write(devfd, verbuf, sector_size) in scandisk()
299 if (llseek(devfd, cursec * sector_size, 0) == -1) { in scandisk()
313 if (read(devfd, verbuf, trksiz) != trksiz) { in scandisk()
316 if (llseek(devfd, tmpsec * sector_size, in scandisk()
324 if (read(devfd, verbuf, sector_size) != in scandisk()