Lines Matching full:ioctl
18 #include <sys/ioctl.h>
132 // Returns block size of device pointed to by fd file descriptor. If the ioctl
148 err = ioctl(fd, DKIOCGETBLOCKSIZE, &blockSize);
151 err = ioctl(fd, DKIOCGMEDIAINFO, &minfo);
156 err = ioctl(fd, DIOCGSECTORSIZE, &blockSize);
159 err = ioctl(fd, BLKSSZGET, &blockSize);
164 // ENOTTY = inappropriate ioctl; probably being called on a disk image
191 if (!ioctl(fd, HDIO_GETGEO, &geometry))
209 if (!ioctl(fd, HDIO_GETGEO, &geometry))
237 i = ioctl(fd, DKIOCFLUSHWRITECACHE);
239 i = ioctl(fd, DKIOCSYNCHRONIZECACHE);
245 i = ioctl(fd, DIOCGFLUSH);
251 sleep(1); // Theoretically unnecessary, but ioctl() fails sometimes if omitted....
253 i = ioctl(fd, BLKRRPART);
410 *err = ioctl(fd, DKIOCGETBLOCKCOUNT, §ors);
414 *err = ioctl(fd, DKIOCGMEDIAINFO, &minfo);
420 *err = ioctl(fd, DIOCGMEDIASIZE, &bytes);
428 *err = ioctl(fd, BLKGETSIZE, &sz);
433 *err = ioctl(fd, BLKGETSIZE64, &b);