[U-Boot] [RFC 3/3] tools/env: Bump devname length to PATH_MAX for filenames

Steve Sakoman steve at sakoman.com
Sat Dec 4 05:28:53 CET 2010


From: Loïc Minier <loic.minier at linaro.org>

This patch increases the devname length to 4096 in order to support writing
to normal files in addition to mtd devices.

Signed-off-by: Loïc Minier <loic.minier at linaro.org>
Tested-by: Steve Sakoman <steve.sakoman at linaro.org>
---
 tools/env/fw_env.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index d2f9748..a75b73b 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -53,8 +53,12 @@
 	(void) (&_min1 == &_min2);		\
 	_min1 < _min2 ? _min1 : _min2; })
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 struct envdev_s {
-	char devname[16];		/* Device name */
+	char devname[PATH_MAX];		/* Device name */
 	ulong devoff;			/* Device offset */
 	ulong env_size;			/* environment size */
 	ulong erase_size;		/* device erase size */
-- 
1.7.0.4



More information about the U-Boot mailing list