X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=78707281ef0e178294f23fbe4bae0bd9e53126b7;hp=e02b4f969452549a330ac9ff32dfe4dd4e716091;hb=23feab3914c879dc3cfaa3b3931210dfbabe7aac;hpb=ad3ee18608b7dbc1cca254d0fb67e0d8f76e4cb8 diff --git a/cli.c b/cli.c index e02b4f9..7870728 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; + 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 [[.
[.