summaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/ubinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ubi-utils/ubinfo.c b/ubi-utils/ubinfo.c
index 82d4f18..29530be 100644
--- a/ubi-utils/ubinfo.c
+++ b/ubi-utils/ubinfo.c
@@ -399,6 +399,12 @@ int main(int argc, char * const argv[])
goto out_libubi;
}
+ if (args.vol_name && args.devn == -1) {
+ errmsg("volume name is specified, but UBI device number is not "
+ "(use -h for help)\n");
+ goto out_libubi;
+ }
+
if (args.vol_name) {
err = get_vol_id_by_name(libubi, args.devn, args.vol_name);
if (err)