Looking for a way to flush writes to the raw disk or volume devices.

This is the code I'm looking at in gptfdisk's diskio-unix.cc:

#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
      sleep(2);
      i = ioctl(fd, DIOCGFLUSH);
      cout << "Warning: The kernel may continue to use old or deleted
partitions.\n"
           << "You should reboot or remove the drive.\n";
      platformFound++;
#endif

I'm not seeing any equivalent to DIOCGFLUSH in the openbsd headers.

grep FLUSH /usr/include/sys/* seems to mostly turn up tty stuff.

--
Joel Rees

I'm a newbie, such a newbie.

Reply via email to