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

Patrick Delaunay patrick.delaunay at st.com
Thu Apr 13 09:52:51 UTC 2017


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

Changes in v5: None
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 112bf1f..796bb98 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)
 #ifdef CONFIG_MTDIDS_DEFAULT
@@ -1985,7 +1988,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