X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=cli.c;h=3ade5343b87cb1d1798530ed29aef2c15b022b7d;hb=b69b459ecce221f92235d0def138ff4af3c22543;hp=afe96e3c12589100d6800d6b28eb31b92147b8af;hpb=9487b850844e4fb873b90cf357c2d0367ebc065c;p=project%2Fuci.git diff --git a/cli.c b/cli.c index afe96e3..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 [[.
[.