diff options
| author | Viktar Palstsiuk <viktar.palstsiuk@promwad.com> | 2011-08-20 07:07:37 +0300 | 
|---|---|---|
| committer | Artem Bityutskiy <Artem.Bityutskiy@intel.com> | 2011-08-20 07:07:37 +0300 | 
| commit | 92ed6c0bf6f6793395cdeec5a61ac2059b005056 (patch) | |
| tree | 8770f62c2b47cba42fd0ef3f62d346c8873bc572 /ubi-utils | |
| parent | b602ab59b9782003d1179488d8c1580bc8563738 (diff) | |
mkfs.ubifs/ubinize: increase PEB size limit to 2MiB
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
Diffstat (limited to 'ubi-utils')
| -rw-r--r-- | ubi-utils/include/libubi.h | 3 | ||||
| -rw-r--r-- | ubi-utils/ubinize.c | 3 | 
2 files changed, 5 insertions, 1 deletions
| diff --git a/ubi-utils/include/libubi.h b/ubi-utils/include/libubi.h index 03b16ad..02017e8 100644 --- a/ubi-utils/include/libubi.h +++ b/ubi-utils/include/libubi.h @@ -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; diff --git a/ubi-utils/ubinize.c b/ubi-utils/ubinize.c index 453494d..3d19a02 100644 --- a/ubi-utils/ubinize.c +++ b/ubi-utils/ubinize.c @@ -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) | 
