summaryrefslogtreecommitdiff
path: root/cmd_debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-05-05 00:27:01 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-05-05 00:27:50 -0800
commite004b95b88ae95cf7bb26bd7dc80c5dcf2b2664a (patch)
treebfa21c820a15686c5dd93293d38dfb8f19cdd46c /cmd_debug.c
parent5db58a0baee8e732b9dc8a90dd4a739253e758a5 (diff)
fix sync writes - don't use O_EXCL
Diffstat (limited to 'cmd_debug.c')
-rw-r--r--cmd_debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd_debug.c b/cmd_debug.c
index 195e5885..974e862e 100644
--- a/cmd_debug.c
+++ b/cmd_debug.c
@@ -129,10 +129,10 @@ int cmd_dump(int argc, char *argv[])
BUG_ON(!nr_devices);
for_each_online_member(ca, c, i) {
- int mode = O_WRONLY|O_CREAT|O_TRUNC;
+ int flags = O_WRONLY|O_CREAT|O_TRUNC;
if (!force)
- mode |= O_EXCL;
+ flags |= O_EXCL;
if (!c->devs[i])
continue;
@@ -140,7 +140,7 @@ int cmd_dump(int argc, char *argv[])
char *path = nr_devices > 1
? mprintf("%s.%u", out, i)
: strdup(out);
- fd = xopen(path, mode, 0600);
+ fd = xopen(path, flags, 0600);
free(path);
dump_one_device(c, ca, fd);