[OpenWrt-Devel] [PATCH 2/3] [ubox] validate: add valid bool types enabled/disabled

Luka Perkov luka at openwrt.org
Fri Jun 27 05:09:03 EDT 2014


They are already supported in config_get_bool function found in OpenWrt
base-package.

Signed-off-by: Luka Perkov <luka at openwrt.org>
---
 validate/validate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/validate/validate.c b/validate/validate.c
index f550e76..5bc3bc4 100644
--- a/validate/validate.c
+++ b/validate/validate.c
@@ -330,8 +330,8 @@ dt_type_bool(struct dt_state *s, int nargs)
 {
 	int i;
 	const char *values[] = {
-		"0", "off", "false", "no",
-		"1", "on", "true", "yes"
+		"0", "off", "false", "no", "disabled",
+		"1", "on", "true", "yes", "enabled"
 	};
 
 	for (i = 0; i < sizeof(values) / sizeof(values[0]); i++)
-- 
2.0.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list