about summary refs log tree commit homepage
path: root/dev.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-01-19 13:35:59 -0800
committerEric Wong <normalperson@yhbt.net>2012-01-19 13:38:35 -0800
commit71c9a33c481346d974c2ea33d646d0c117a7b20c (patch)
tree903bd2fda0db9cba823faa99598d87e37cb142c4 /dev.c
parent63459a67db01fb58e35ec21667cfdaff594be216 (diff)
downloadcmogstored-71c9a33c481346d974c2ea33d646d0c117a7b20c.tar.gz
This gives necessary flexibility in choosing open(2) flags (for
Content-Range: uploads) without further complicating things.
Diffstat (limited to 'dev.c')
-rw-r--r--dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev.c b/dev.c
index 5eb9d55..1c3641a 100644
--- a/dev.c
+++ b/dev.c
@@ -78,7 +78,7 @@ int mog_dev_mkusage(const struct mog_dev *dev, struct mog_svc *svc)
         if (mog_unlink(svc, tmp_path) < 0 && errno != ENOENT) goto out;
 
         errno = 0;
-        fd = mog_open_excl(svc, tmp_path);
+        fd = mog_open_put(svc, tmp_path, O_EXCL|O_CREAT);
         if (fd < 0) goto out;
         if (fstatvfs(fd, &v) < 0) goto out;
         if (emit_usage(dev, svc, fd, &v) < 0) goto out;