X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=3d25b7c42c21dc3eeda83987ff1bc56a39ad0250;hp=4bc023445b2c1d59114aaaa4b8745e6e981019a3;hb=78f76bde7306cc9dd501b5325b2e40af8b22ad51;hpb=789aa0a4105c34212c2a4a1be7b0c6095691139c diff --git a/cli.c b/cli.c index 4bc0234..3d25b7c 100644 --- a/cli.c +++ b/cli.c @@ -12,158 +12,244 @@ */ #include #include +#include #include "uci.h" +static const char *appname = "uci"; + static struct uci_context *ctx; -static char *buf = NULL; -static int buflen = 256; +enum { + CMD_GET, + CMD_SET, + CMD_DEL +}; static void uci_usage(int argc, char **argv) { fprintf(stderr, "Usage: %s [] []\n\n" "Commands:\n" - "\tshow [[.
[.