]> mj.ucw.cz Git - libucw.git/blobdiff - lib/log-file.c
Added a direct I/O fastbuf backend.
[libucw.git] / lib / log-file.c
index c6575cc42f726d3f4b1870315aea423fa8e74acc..20dea918c80ae13813913ecd05f58a7b4d99971d 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "lib/lib.h"
  */
 
 #include "lib/lib.h"
+#include "lib/lfs.h"
 
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -37,7 +38,7 @@ do_log_switch(struct tm *tm)
   if (strcmp(name, log_filename))
     {
       strcpy(log_filename, name);
   if (strcmp(name, log_filename))
     {
       strcpy(log_filename, name);
-      fd = open(name, O_WRONLY | O_CREAT | O_APPEND, 0666);
+      fd = sh_open(name, O_WRONLY | O_CREAT | O_APPEND, 0666);
       if (fd < 0)
        die("Unable to open log file %s: %m", name);
       close(2);
       if (fd < 0)
        die("Unable to open log file %s: %m", name);
       close(2);