diff mbox

[U-Boot,v5,11/26] net: Add default flags for common net env vars

Message ID 1432150059-24238-12-git-send-email-joe.hershberger@ni.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Joe Hershberger May 20, 2015, 7:27 p.m. UTC
Check that the common network stack's env vars conform to the proper
format for IP addresses.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

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

 include/env_flags.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Tom Rini May 23, 2015, 12:40 p.m. UTC | #1
On Wed, May 20, 2015 at 02:27:24PM -0500, Joe Hershberger wrote:

> Check that the common network stack's env vars conform to the proper
> format for IP addresses.
> 
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/env_flags.h b/include/env_flags.h
index fc6d0d8..2d2de88 100644
--- a/include/env_flags.h
+++ b/include/env_flags.h
@@ -52,8 +52,17 @@  enum env_flags_varaccess {
 #define ETHADDR_FLAGS "eth" ETHADDR_WILDCARD "addr:mo,"
 #endif
 #endif
+#define NET_FLAGS \
+	"ipaddr:i," \
+	"gatewayip:i," \
+	"netmask:i," \
+	"serverip:i," \
+	"nvlan:i," \
+	"vlan:i," \
+	"dnsip:i,"
 #else
-#define ETHADDR_FLAGS ""
+#define ETHADDR_FLAGS
+#define NET_FLAGS
 #endif
 
 #ifndef CONFIG_ENV_OVERWRITE
@@ -64,6 +73,7 @@  enum env_flags_varaccess {
 
 #define ENV_FLAGS_LIST_STATIC \
 	ETHADDR_FLAGS \
+	NET_FLAGS \
 	SERIAL_FLAGS \
 	CONFIG_ENV_FLAGS_LIST_STATIC