net: Add default flags for common net env vars
authorJoe Hershberger <joe.hershberger@ni.com>
Wed, 20 May 2015 19:27:24 +0000 (14:27 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 21 May 2015 13:13:20 +0000 (09:13 -0400)
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>
include/env_flags.h

index fc6d0d842f3d1c1a53d251f34deab9709d5f3fa4..2d2de88fc04fdd187caf5dd32799a56b6ac3ede0 100644 (file)
@@ -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