From: Yousong Zhou Date: Sat, 24 Jan 2015 15:07:52 +0000 (+0800) Subject: cli: enhance "uci show" command on nonexistent sections and options. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e26ec5716e8b23706bbb566b136eb06138ad978;p=oweals%2Fuci.git cli: enhance "uci show" command on nonexistent sections and options. When doing "uci show network.nilsection", the current behaviour is that uci will emit a error message complaining "Entry not found", then continue to show all content of the package network itself. This is couter-intuition. Signed-off-by: Yousong Zhou --- diff --git a/cli.c b/cli.c index 8f32255..b647f77 100644 --- a/cli.c +++ b/cli.c @@ -314,6 +314,7 @@ static int package_cmd(int cmd, char *tuple) if (!(ptr.flags & UCI_LOOKUP_COMPLETE)) { ctx->err = UCI_ERR_NOTFOUND; cli_perror(); + goto out; } switch(e->type) { case UCI_TYPE_PACKAGE: