2 * flushb.c --- This routine flushes the disk buffers for a disk
10 #include <sys/ioctl.h>
21 static void usage(NOARGS)
23 fprintf(stderr, _("Usage: %s disk\n"), progname);
27 int main(int argc, char **argv)
35 fd = open(argv[1], O_RDONLY, 0);
41 * Note: to reread the partition table, use the ioctl
42 * BLKRRPART instead of BLKFSLBUF.
45 if (ioctl(fd, BLKFLSBUF, 0) < 0) {
46 perror("ioctl BLKFLSBUF");
52 _("BLKFLSBUF ioctl not supported! Can't flush buffers.\n"));