aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/new-utils/src/ubiupdatevol.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-05-13 14:28:45 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-05-13 14:30:13 +0300
commitd9f463a49600b60f313a94d8765da261aabf867a (patch)
treed095331d38d94464d99e06b8568567b0d7a61e2c /ubi-utils/new-utils/src/ubiupdatevol.c
parentd5f5e57b72289bb5f551a4e17be0132aa8dfb6c4 (diff)
ubi-utils: fixe ubiupdatevol
-t option does not require image file. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
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");