summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/src/ubinfo.c')
-rw-r--r--ubi-utils/src/ubinfo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ubi-utils/src/ubinfo.c b/ubi-utils/src/ubinfo.c
index a0bbbec..280c770 100644
--- a/ubi-utils/src/ubinfo.c
+++ b/ubi-utils/src/ubinfo.c
@@ -335,8 +335,11 @@ static int print_general_info(libubi_t libubi, int all)
printf("UBI version: %d\n", ubi_info.version);
printf("Count of UBI devices: %d\n", ubi_info.dev_count);
- printf("UBI control device major/minor: %d:%d\n",
- ubi_info.ctrl_major, ubi_info.ctrl_minor);
+ if (ubi_info.ctrl_major != -1)
+ printf("UBI control device major/minor: %d:%d\n",
+ ubi_info.ctrl_major, ubi_info.ctrl_minor);
+ else
+ printf("UBI control device is not supported by this kernel\n");
if (ubi_info.dev_count == 0)
return 0;