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

Steve Sakoman
2010-12-04T04:28:53Z

From: Lo?c Minier <loic.minier@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@linaro.org>
Tested-by: Steve Sakoman <steve.sakoman@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