X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=87de48cda96654ab63a7ab2e9a6479a9fc406c80;hp=5e0697da2ed2f0f808092941fb9207ecc50ad22f;hb=05cf670dde3610279a07b76277cc29ceb4d7ad00;hpb=854f7c5d08cd37aeb7414e26ed6666fad26f5f7a diff --git a/cli.c b/cli.c index 5e0697d..87de48c 100644 --- a/cli.c +++ b/cli.c @@ -12,40 +12,200 @@ */ #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; +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 [options] [arguments]\n\n" + "Usage: %s [] []\n\n" "Commands:\n" - "\tshow [[.
[.