summaryrefslogtreecommitdiff
path: root/ubi-utils/new-utils/src/ubiupdatevol.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/new-utils/src/ubiupdatevol.c')
-rw-r--r--ubi-utils/new-utils/src/ubiupdatevol.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ubi-utils/new-utils/src/ubiupdatevol.c b/ubi-utils/new-utils/src/ubiupdatevol.c
index 7748de8..ae7b9ff 100644
--- a/ubi-utils/new-utils/src/ubiupdatevol.c
+++ b/ubi-utils/new-utils/src/ubiupdatevol.c
@@ -143,7 +143,7 @@ static int parse_opt(int argc, char * const argv[])
} else {
if (optind == argc)
return errmsg("UBI device name was not specified (use -h for help)");
- else if (optind != argc - 2)
+ else if (optind != argc - 2 && !args.truncate)
return errmsg("specify UBI device name and image file name as first 2 "
"parameters (use -h for help)");
}
@@ -292,9 +292,6 @@ int main(int argc, char * const argv[])
if (err)
return -1;
- if (!args.img && !args.truncate)
- return errmsg("incorrect arguments, use -h for help");
-
libubi = libubi_open(1);
if (libubi == NULL) {
sys_errmsg("cannot open libubi");