8/22 no O_SYNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is no O_SYNC in the Win32 API. This general patch disables it as suggested by Jim Meyering yesterday.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.118
diff -u -r1.118 virsh.c
--- src/virsh.c	6 Dec 2007 16:36:21 -0000	1.118
+++ src/virsh.c	7 Dec 2007 10:44:44 -0000
@@ -4537,6 +4556,11 @@
     return TRUE;
 }
 
+#ifndef O_SYNC
+#define O_SYNC 0
+#endif
+#define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT | O_SYNC)
+
 /**
  * vshOpenLogFile:
  *
@@ -4566,7 +4590,7 @@
     }
 
     /* log file open */
-    if ((ctl->log_fd = open(ctl->logfile, O_WRONLY | O_APPEND | O_CREAT | O_SYNC, FILE_MODE)) < 0) {
+    if ((ctl->log_fd = open(ctl->logfile, LOGFILE_FLAGS, FILE_MODE)) < 0) {
         vshError(ctl, TRUE, _("failed to open the log file. check the log file path"));
     }
 }

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]