diff options
Diffstat (limited to 'ubi-utils/src/ubimkvol.c')
-rw-r--r-- | ubi-utils/src/ubimkvol.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ubi-utils/src/ubimkvol.c b/ubi-utils/src/ubimkvol.c index 8d6029a..dba7133 100644 --- a/ubi-utils/src/ubimkvol.c +++ b/ubi-utils/src/ubimkvol.c @@ -238,9 +238,12 @@ int main(int argc, char * const argv[]) if (err) return err; - libubi = libubi_open(1); - if (!libubi) + libubi = libubi_open(); + if (!libubi) { + if (errno == 0) + return errmsg("UBI is not present in the system"); return sys_errmsg("cannot open libubi"); + } err = ubi_probe_node(libubi, args.node); if (err == 2) { |