X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=cli.c;h=3ade5343b87cb1d1798530ed29aef2c15b022b7d;hb=a49b8b7e23945590fc35c7a8ef904169e856368b;hp=3a19b36c9a7bdc193e1b56b702a5a1dacfcae9cd;hpb=8f5a6c07caaaf5bd692623d1ed8ffbfa20f564d8;p=project%2Fuci.git diff --git a/cli.c b/cli.c index 3a19b36..3ade534 100644 --- a/cli.c +++ b/cli.c @@ -12,19 +12,37 @@ */ #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, + CMD_SET, + CMD_DEL, + CMD_RENAME, + /* package cmds */ + CMD_SHOW, + CMD_EXPORT, + CMD_COMMIT, +}; static void uci_usage(int argc, char **argv) { fprintf(stderr, "Usage: %s [] []\n\n" "Commands:\n" - "\tshow [[.
[.