From d9f463a49600b60f313a94d8765da261aabf867a Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 13 May 2008 14:28:45 +0300 Subject: ubi-utils: fixe ubiupdatevol -t option does not require image file. Signed-off-by: Artem Bityutskiy --- ubi-utils/new-utils/src/ubiupdatevol.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ubi-utils/new-utils/src/ubiupdatevol.c') 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"); -- cgit v1.2.3