[OpenWrt-Devel] [PATCH 3/3] [ubox] validate: add missing yes/no boolean values

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


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

diff --git a/validate/cli.c b/validate/cli.c
index a2a82ed..935b5f7 100644
--- a/validate/cli.c
+++ b/validate/cli.c
@@ -22,9 +22,9 @@ print_usage(char *argv)
 static const char *
 bool_to_num(const char *val)
 {
-	if (!strcmp(val, "0") || !strcmp(val, "off") || !strcmp(val, "false") || !strcmp(val, "disabled"))
+	if (!strcmp(val, "0") || !strcmp(val, "off") || !strcmp(val, "false") || !strcmp(val, "no") || !strcmp(val, "disabled"))
 		return "0";
-	if (!strcmp(val, "1") || !strcmp(val, "on") || !strcmp(val, "true") || !strcmp(val, "enabled"))
+	if (!strcmp(val, "1") || !strcmp(val, "on") || !strcmp(val, "true") || !strcmp(val, "yes") || !strcmp(val, "enabled"))
 		return "1";
 
 	return "";
-- 
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