summaryrefslogtreecommitdiff
path: root/validate/cli.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-11-14 13:43:19 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-15 17:10:20 +0100
commit0ff5e8917bc3205d9887d5f714369a0072829edc (patch)
tree7db64f5b6f607c4dc7317d2f2f64f01c1f691237 /validate/cli.c
parent2fdd374f4214129d93f10b7001adece9239752a2 (diff)
downloadubox-0ff5e8917bc3205d9887d5f714369a0072829edc.tar.gz
add validation code
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'validate/cli.c')
-rw-r--r--validate/cli.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/validate/cli.c b/validate/cli.c
new file mode 100644
index 0000000..dc5e96b
--- /dev/null
+++ b/validate/cli.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <ctype.h>
+
+#include <arpa/inet.h>
+#include <netinet/ether.h>
+#include <sys/stat.h>
+
+#include "libvalidate.h"
+
+int main(int argc, char **argv)
+{
+ bool rv;
+
+ if (argc == 3) {
+ rv = dt_parse(argv[1], argv[2]);
+
+ printf("%s - %s = %s\n", argv[1], argv[2], rv ? "true" : "false");
+
+ return rv ? 0 : 1;
+ } else if (argc > 3) {
+
+ }
+
+ return 0;
+}