Looking at this flushwc.c a little further, it looks suspiciously like only SCSI and ATA disk cases are considered. I have it running on an SD card and it seems to work, but according to the code in that file, if it's not an IDE or SCSI disk:
default:
//Unknown block device driver. Can't flush the write cache.
return ENOTSUP;
Whatever it does in this case clearly isn't fatal. But looking at how this works, I think this entire file could be simplified to a single function:
***
int flushwc(vnode_t *vn) {
int major_number;
if(!S_ISBLK(vn->v_stat.st_mode))
// We can only flush the write cache of a block device.
return ENOTSUP;
return ioctl (vn->v_fd, BLKFLSBUF, 0);
***
That should work universally for flushing caches on any block device (it's a higher level ioctl call than for a raw disk), which means that SCSI and ATA specific functions could be removed.