diff options
-rw-r--r-- | ubi-utils/new-utils/src/ubimkvol.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ubi-utils/new-utils/src/ubimkvol.c b/ubi-utils/new-utils/src/ubimkvol.c index fd8c568..ad072c4 100644 --- a/ubi-utils/new-utils/src/ubimkvol.c +++ b/ubi-utils/new-utils/src/ubimkvol.c @@ -261,6 +261,11 @@ int main(int argc, char * const argv[]) goto out_libubi; } + if (dev_info.avail_bytes == 0) { + errmsg("UBI device does not have free logical eraseblocks"); + goto out_libubi; + } + if (args.maxavs) { args.bytes = dev_info.avail_bytes; printf("Set volume size to %lld\n", args.bytes); |