X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=cli.c;h=946a90553242efff1ca2f201c459479a35909385;hp=828c7b931593dba7d92ea982db6eec4d356062c6;hb=cf66ea9067d3e9ffe77f42723c5b2f9d38b05ecf;hpb=d0470b6f42a7eeba079adeee21ad96170de67f34 diff --git a/cli.c b/cli.c index 828c7b9..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 @@ -17,9 +18,11 @@ static const char *appname = "uci"; static enum { - CLI_FLAG_MERGE = (1 << 0), + CLI_FLAG_MERGE = (1 << 0), + CLI_FLAG_QUIET = (1 << 1), + CLI_FLAG_NOCOMMIT = (1 << 2), } flags; -static FILE *input = stdin; +static FILE *input; static struct uci_context *ctx; enum { @@ -28,6 +31,7 @@ enum { CMD_SET, CMD_DEL, CMD_RENAME, + CMD_REVERT, /* package cmds */ CMD_SHOW, CMD_IMPORT, @@ -46,11 +50,17 @@ static void uci_usage(int argc, char **argv) "\tget .
[.