added --no-overwrite option to rrdtool create. It prevents rrdtool from clobbering...
[rrdtool.git] / src / rrd_open.c
index 7d6ddc9..0939e7c 100644 (file)
@@ -172,6 +172,9 @@ rrd_file_t *rrd_open(
         if (rdwr & RRD_CREAT) {
             flags |= (O_CREAT | O_TRUNC);
         }
+        if (rdwr & RRD_EXCL) {
+            flags |= O_EXCL;
+        }
     }
     if (rdwr & RRD_READAHEAD) {
 #ifdef MAP_POPULATE