[OpenWrt-Devel] [PATCH 3/4] cli: enhance "uci show" command on nonexistent sections and options.

Yousong Zhou yszhou4tech at gmail.com
Sat Jan 24 10:07:52 EST 2015

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

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
 cli.c |    1 +
 1 file changed, 1 insertion(+)

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;
+			goto out;
 		switch(e->type) {
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list