summaryrefslogtreecommitdiffstats
path: root/commands/mw.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/mw.c')
-rw-r--r--commands/mw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/mw.c b/commands/mw.c
index 7ff589abb1..2912997a31 100644
--- a/commands/mw.c
+++ b/commands/mw.c
@@ -52,7 +52,7 @@ static int do_mem_mw(int argc, char *argv[])
adr = strtoull_suffix(argv[optind++], NULL, 0);
- fd = open_and_lseek(filename, mode | O_WRONLY, adr);
+ fd = open_and_lseek(filename, mode | O_WRONLY | O_CREAT, adr);
if (fd < 0)
return 1;