X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=946a90553242efff1ca2f201c459479a35909385;hp=043ba1a05d90063093c3d50c1b07916b3a6664e9;hb=c394d8787defccf5f127f75f7f999d0a8ddff514;hpb=8e57ddf6b61e9e95e1f319b1def18789f19f9ee1;ds=sidebyside diff --git a/cli.c b/cli.c index 043ba1a..946a905 100644 --- a/cli.c +++ b/cli.c @@ -1,4 +1,5 @@ /* + * cli - Command Line Interface for the Unified Configuration Interface * Copyright (C) 2008 Felix Fietkau * * This program is free software; you can redistribute it and/or modify @@ -12,15 +13,30 @@ */ #include #include +#include #include "uci.h" static const char *appname = "uci"; +static enum { + CLI_FLAG_MERGE = (1 << 0), + CLI_FLAG_QUIET = (1 << 1), + CLI_FLAG_NOCOMMIT = (1 << 2), +} flags; +static FILE *input; static struct uci_context *ctx; enum { + /* section cmds */ CMD_GET, CMD_SET, - CMD_DEL + CMD_DEL, + CMD_RENAME, + CMD_REVERT, + /* package cmds */ + CMD_SHOW, + CMD_IMPORT, + CMD_EXPORT, + CMD_COMMIT, }; static void uci_usage(int argc, char **argv) @@ -28,16 +44,38 @@ static void uci_usage(int argc, char **argv) fprintf(stderr, "Usage: %s [] []\n\n" "Commands:\n" - "\texport []\n" - "\tshow [[.
[.