[U-Boot] [PATCH v4 13/16] cmd: mtdparts: move PART_ADD_DESC_MAXLEN

Patrick Delaunay patrick.delaunay at st.com
Wed Mar 15 14:11:44 UTC 2017


Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 cmd/mtdparts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index b9b160d..5f97b80 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -108,6 +108,9 @@ DECLARE_GLOBAL_DATA_PTR;
  * field for read-only partitions */
 #define MTD_WRITEABLE_CMD		1
 
+/* max size for partition description */
+#define PART_ADD_DESC_MAXLEN 64
+
 /* default values for mtdids and mtdparts variables */
 #if !defined(MTDIDS_DEFAULT)
 #define MTDIDS_DEFAULT NULL
@@ -1977,7 +1980,6 @@ static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc,
 
 	/* mtdparts add <mtd-dev> <size>[@<offset>] <name> [ro] */
 	if (((argc == 5) || (argc == 6)) && (strncmp(argv[1], "add", 3) == 0)) {
-#define PART_ADD_DESC_MAXLEN 64
 		char tmpbuf[PART_ADD_DESC_MAXLEN];
 #if defined(CONFIG_CMD_MTDPARTS_SPREAD)
 		struct mtd_info *mtd;
-- 
1.9.1



More information about the U-Boot mailing list