diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-06-06 20:23:52 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-06-06 20:23:52 +0200 |
commit | 1879c8f32327177f5c0ca02c9bf9923c55d9b8b0 (patch) | |
tree | 06c9379740112309ff5059540861fa9304e556bb /cli.c | |
parent | c4226c1a45e70346933a1985e159f3eff9d380a5 (diff) | |
download | uci-1879c8f32327177f5c0ca02c9bf9923c55d9b8b0.tar.gz |
allow the cli to override the confdirv0.4.3
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -68,6 +68,7 @@ static void uci_usage(void) "\trevert <config>[.<section>[.<option>]]\n" "\n" "Options:\n" + "\t-c <path> set the search path for config files (default: /etc/config)\n" "\t-f <file> use <file> as input instead of stdin\n" "\t-m when importing, merge data into an existing package\n" "\t-n name unnamed sections on export (default)\n" @@ -478,8 +479,11 @@ int main(int argc, char **argv) return 1; } - while((c = getopt(argc, argv, "f:mnNp:P:sSq")) != -1) { + while((c = getopt(argc, argv, "c:f:mnNp:P:sSq")) != -1) { switch(c) { + case 'c': + uci_set_confdir(ctx, optarg); + break; case 'f': input = fopen(optarg, "r"); if (!input) { |