projects
/
oweals
/
iwinfo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
149ce00
)
utils: support extended format for uci section lookup
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 27 Oct 2014 16:01:38 +0000
(17:01 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 27 Oct 2014 16:27:52 +0000
(17:27 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
iwinfo_utils.c
patch
|
blob
|
history
diff --git
a/iwinfo_utils.c
b/iwinfo_utils.c
index b313ea2049ca540c24b1922d085485a845c346bf..93de0324bc3d3eda6e5cddcf340298d843ac8921 100644
(file)
--- a/
iwinfo_utils.c
+++ b/
iwinfo_utils.c
@@
-372,6
+372,7
@@
struct uci_section *iwinfo_uci_get_radio(const char *name, const char *type)
struct uci_ptr ptr = {
.package = "wireless",
.section = name,
+ .flags = UCI_LOOKUP_EXTENDED,
};
const char *opt;
@@
-381,11
+382,7
@@
struct uci_section *iwinfo_uci_get_radio(const char *name, const char *type)
return NULL;
}
- memset(&ptr, 0, sizeof(ptr));
- ptr.package = "wireless";
- ptr.section = name;
-
- if (uci_lookup_ptr(uci_ctx, &ptr, NULL, false))
+ if (uci_lookup_ptr(uci_ctx, &ptr, NULL, true))
return NULL;
if (!ptr.s || strcmp(ptr.s->type, "wifi-device") != 0)