X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=3ade5343b87cb1d1798530ed29aef2c15b022b7d;hp=1fe7cc72758346b30516d237b9a987aae5ecbfbd;hb=b69b459ecce221f92235d0def138ff4af3c22543;hpb=8a3154a1db5078cf211c3ea76171956ba076dd76 diff --git a/cli.c b/cli.c index 1fe7cc7..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 [[.
[.