]> www.infradead.org Git - mtd-utils.git/commitdiff
mkfs.ubifs/ubinize: increase PEB size limit to 2MiB
authorViktar Palstsiuk <viktar.palstsiuk@promwad.com>
Sat, 20 Aug 2011 04:07:37 +0000 (07:07 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@intel.com>
Sat, 20 Aug 2011 04:07:37 +0000 (07:07 +0300)
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
mkfs.ubifs/mkfs.ubifs.c
mkfs.ubifs/ubifs.h
ubi-utils/include/libubi.h
ubi-utils/ubinize.c

index dcdb7224188df6b806da1c2a6f6b69784caec8a9..f77e5e68eb712c6002b07a01e783c0e35d44c201 100644 (file)
@@ -390,7 +390,7 @@ static int validate_options(void)
                return err_msg("LEB should be multiple of min. I/O units");
        if (c->leb_size % 8)
                return err_msg("LEB size has to be multiple of 8");
-       if (c->leb_size > 1024*1024)
+       if (c->leb_size > UBIFS_MAX_LEB_SZ)
                return err_msg("too large LEB size %d", c->leb_size);
        if (c->max_leb_cnt < UBIFS_MIN_LEB_CNT)
                return err_msg("too low max. count of LEBs, minimum is %d",
index f94a52cc2fdce1e342049de5f6e9b7e7f5392701..434b651859b3eae5178e538e029e89ff7d1bfdec 100644 (file)
@@ -25,6 +25,9 @@
 #ifndef __UBIFS_H__
 #define __UBIFS_H__
 
+/* Maximum logical eraseblock size in bytes */
+#define UBIFS_MAX_LEB_SZ (2*1024*1024)
+
 /* Minimum amount of data UBIFS writes to the flash */
 #define MIN_WRITE_SZ (UBIFS_DATA_NODE_SZ + 8)
 
index 03b16adb84f293617f2af221fbe001e6cd7af677..02017e87ad679fcb6924336ec3fd3b68b6099e84 100644 (file)
@@ -35,6 +35,9 @@ extern "C" {
 /* UBI version libubi is made for */
 #define LIBUBI_UBI_VERSION 1
 
+/* Maximum physical eraseblock size in bytes */
+#define UBI_MAX_PEB_SZ (2*1024*1024)
+
 /* UBI library descriptor */
 typedef void * libubi_t;
 
index 453494d3acad5902c3f9ff0dab3975f20454e834..3d19a02a5571577b6759d29242595973e29b3e45 100644 (file)
@@ -35,6 +35,7 @@
 #include <mtd/ubi-media.h>
 #include <libubigen.h>
 #include <libiniparser.h>
+#include <libubi.h>
 #include "common.h"
 #include "ubiutils-common.h"
 
@@ -253,7 +254,7 @@ static int parse_opt(int argc, char * const argv[])
        if (args.peb_size < 0)
                return errmsg("physical eraseblock size was not specified (use -h for help)");
 
-       if (args.peb_size > 1024*1024)
+       if (args.peb_size > UBI_MAX_PEB_SZ)
                return errmsg("too high physical eraseblock size %d", args.peb_size);
 
        if (args.min_io_size < 0)