X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=cli.c;h=cdd1838e1b2a17f15ed9a480c403661b32e3e65c;hb=4094cedb83a0b92a179af13d1781a8fd7d3d943e;hp=40b5d9115193519e5361f88a0002465f346924f1;hpb=81e4f335d5c725e40614c26f9ef4778fa1a4aecf;p=project%2Fuci.git diff --git a/cli.c b/cli.c index 40b5d91..cdd1838 100644 --- a/cli.c +++ b/cli.c @@ -12,153 +12,248 @@ */ #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 { + /* section cmds */ + CMD_GET = 1, + CMD_SET = 2, + CMD_DEL = 3, + /* package cmds */ + CMD_SHOW = 4, + CMD_EXPORT = 5, + CMD_COMMIT = 6, +}; static void uci_usage(int argc, char **argv) { fprintf(stderr, "Usage: %s [] []\n\n" "Commands:\n" - "\tshow [[.
[.