summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/ubi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/ubi.c b/commands/ubi.c
index 4c445d2216..5e2758400a 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -42,7 +42,7 @@ static int do_ubiupdatevol(int argc, char *argv[])
return 1;
}
- fd_vol = open(argv[optind], O_WRONLY);
+ fd_vol = open(argv[optind], O_WRONLY | O_TRUNC);
if (fd_vol < 0) {
perror("open volume");
ret = 1;