Lines Matching refs:ioctl
20 #include <sys/ioctl.h>
156 // Returns block size of device pointed to by fd file descriptor. If the ioctl
172 err = ioctl(fd, DKIOCGETBLOCKSIZE, &blockSize);
175 err = ioctl(fd, DKIOCGMEDIAINFO, &minfo);
180 err = ioctl(fd, DIOCGSECTORSIZE, &blockSize);
183 err = ioctl(fd, BLKSSZGET, &blockSize);
188 // ENOTTY = inappropriate ioctl; probably being called on a disk image
216 err = ioctl(fd, BLKPBSZGET, &physBlockSize);
236 if (!ioctl(fd, HDIO_GETGEO, &geometry))
254 if (!ioctl(fd, HDIO_GETGEO, &geometry))
282 i = ioctl(fd, DKIOCFLUSHWRITECACHE);
284 i = ioctl(fd, DKIOCSYNCHRONIZECACHE);
290 i = ioctl(fd, DIOCGFLUSH);
296 sleep(1); // Theoretically unnecessary, but ioctl() fails sometimes if omitted....
298 i = ioctl(fd, BLKRRPART);
456 *err = ioctl(fd, DKIOCGETBLOCKCOUNT, §ors);
460 *err = ioctl(fd, DKIOCGMEDIAINFO, &minfo);
466 *err = ioctl(fd, DIOCGMEDIASIZE, &bytes);
474 *err = ioctl(fd, BLKGETSIZE, &sz);
479 *err = ioctl(fd, BLKGETSIZE64, &b);