diff options
Diffstat (limited to 'lib/libubi.c')
-rw-r--r-- | lib/libubi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libubi.c b/lib/libubi.c index 99022dd..f1cc37a 100644 --- a/lib/libubi.c +++ b/lib/libubi.c @@ -1242,8 +1242,11 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id, info->dev_num = dev_num; info->vol_id = vol_id; - if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) + if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) { + if (errno == ENOENT) + errno = ENODEV; return -1; + } ret = vol_read_data(lib->vol_type, dev_num, vol_id, buf, 50); if (ret < 0) |