summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubiupdatevol.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/src/ubiupdatevol.c')
-rw-r--r--ubi-utils/src/ubiupdatevol.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ubi-utils/src/ubiupdatevol.c b/ubi-utils/src/ubiupdatevol.c
index a1e5a30..b160461 100644
--- a/ubi-utils/src/ubiupdatevol.c
+++ b/ubi-utils/src/ubiupdatevol.c
@@ -316,9 +316,12 @@ int main(int argc, char * const argv[])
if (err)
return -1;
- libubi = libubi_open(1);
- if (libubi == NULL) {
- sys_errmsg("cannot open libubi");
+ libubi = libubi_open();
+ if (!libubi) {
+ if (errno == 0)
+ errmsg("UBI is not present in the system");
+ else
+ sys_errmsg("cannot open libubi");
goto out_libubi;
}