aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/ubinfo.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ubi-utils/ubinfo.c b/ubi-utils/ubinfo.c
index 29530be..53519cc 100644
--- a/ubi-utils/ubinfo.c
+++ b/ubi-utils/ubinfo.c
@@ -417,12 +417,9 @@ int main(int argc, char * const argv[])
goto out_libubi;
}
- if (args.devn != -1 && args.vol_id != -1) {
- print_vol_info(libubi, args.devn, args.vol_id);
- goto out;
- }
-
- if (args.devn == -1 && args.vol_id == -1)
+ if (args.devn != -1 && args.vol_id != -1)
+ err = print_vol_info(libubi, args.devn, args.vol_id);
+ else if (args.devn == -1 && args.vol_id == -1)
err = print_general_info(libubi, args.all);
else if (args.devn != -1 && args.vol_id == -1)
err = print_dev_info(libubi, args.devn, args.all);