diff options
Diffstat (limited to 'ubi-utils/src')
-rw-r--r-- | ubi-utils/src/ubiformat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c index 681ea30..c87dfd0 100644 --- a/ubi-utils/src/ubiformat.c +++ b/ubi-utils/src/ubiformat.c @@ -721,6 +721,11 @@ int main(int argc, char * const argv[]) goto out_close_mtd; } + if (!is_power_of_2(mtd.min_io_size)) { + errmsg("min. I/O size is %d, but should be power of 2"); + goto out_close; + } + if (!mtd_info.sysfs_supported) { /* * Linux kernels older than 2.6.30 did not support sysfs |