OSSP CVS Repository

ossp - Check-in [1992]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1992
Date: 2002-Mar-13 15:49:39 (local)
2002-Mar-13 14:49:39 (UTC)
User:thl
Branch:
Comment: not append means truncate
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2_ch_file.c      1.21 -> 1.22     2 inserted, 0 deleted

ossp-pkg/l2/l2_ch_file.c 1.21 -> 1.22

--- l2_ch_file.c 2002/01/02 17:07:38     1.21
+++ l2_ch_file.c 2002/03/13 14:49:39     1.22
@@ -95,6 +95,8 @@
     mode = O_WRONLY|O_CREAT;
     if (cfg->append)
         mode |= O_APPEND;
+    else
+        mode |= O_TRUNC;
     if ((cfg->fd = open(cfg->path, mode, cfg->perm)) == -1)
         return L2_ERR_SYS;
 

CVSTrac 2.0.1