/*
- * Sherlock Library -- Fast Buffered I/O on Files
+ * UCW Library -- Fast Buffered I/O on Files
*
* (c) 1997--2004 Martin Mares <mj@ucw.cz>
*
#include "lib/fastbuf.h"
#include "lib/lfs.h"
-#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
return f;
}
+void
+bfilesync(struct fastbuf *b)
+{
+ bflush(b);
+ if (fsync(FB_FILE(b)->fd) < 0)
+ log(L_ERROR, "fsync(%s) failed: %m", b->name);
+}
+
#ifdef TEST
int main(int argc, char **argv)