X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=bedef6dbbed012490ead5622e8ec09ea94a6faf8;hp=afe96e3c12589100d6800d6b28eb31b92147b8af;hb=3805b1bec063bfe383e6976135b4bf7dedcd5f5d;hpb=9487b850844e4fb873b90cf357c2d0367ebc065c diff --git a/cli.c b/cli.c index afe96e3..bedef6d 100644 --- a/cli.c +++ b/cli.c @@ -12,19 +12,48 @@ */ #include #include +#include #include "uci.h" +static const char *appname = "uci"; +static enum { + CLI_FLAG_MERGE = (1 << 0), +} flags; +static FILE *input = stdin; + 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_IMPORT, + CMD_EXPORT, + CMD_COMMIT, +}; static void uci_usage(int argc, char **argv) { fprintf(stderr, "Usage: %s [] []\n\n" "Commands:\n" - "\tshow [[.
[.