]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fb-file.c
Fixed parsing of bin/config output (by TomHol in rel-3-6-1).
[libucw.git] / lib / fb-file.c
index 169f25e1a027ac858600b3824a7015a12994fbc7..cbfe1b0ca31fc2771a92a4a5a5670d8f27a6d4b8 100644 (file)
@@ -1,8 +1,7 @@
 /*
- *     Sherlock Library -- Fast Buffered I/O on Files
+ *     UCW Library -- Fast Buffered I/O on Files
  *
  *     (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *     (c) 2004 Robert Spalek <robert@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU Lesser General Public License.
@@ -154,6 +153,14 @@ bfdopen_shared(int fd, uns buflen)
   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)