summaryrefslogtreecommitdiffstats
path: root/src/wgt-info.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2015-12-11 18:01:18 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2015-12-11 18:01:18 +0100
commit7e1027342a3cff95635ba2107f283321cf0efa08 (patch)
tree50cd50416e25fc1c90c745ff95cd76b9fcb6857b /src/wgt-info.c
parent9ab266df6642c6e930e03b3024d7c3d53ef88bbc (diff)
work in progress
Change-Id: I65416563a8dc54e877df03a304fe4cbd42ebb3da
Diffstat (limited to 'src/wgt-info.c')
-rw-r--r--src/wgt-info.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wgt-info.c b/src/wgt-info.c
index d5f664b..61779e0 100644
--- a/src/wgt-info.c
+++ b/src/wgt-info.c
@@ -423,3 +423,21 @@ void wgt_info_dump(struct wgt_info *ifo, int fd, const char *prefix)
}
}
+const struct wgt_desc_feature *wgt_info_feature(struct wgt_info *ifo, const char *name)
+{
+ const struct wgt_desc_feature *result = ifo->desc.features;
+ while(result && strcmp(result->name, name))
+ result = result->next;
+ return result;
+}
+
+const char *wgt_info_param(const struct wgt_desc_feature *feature, const char *name)
+{
+ const struct wgt_desc_param *param = feature->params;
+ while(param) {
+ if (0 == strcmp(name, param->name))
+ return param->value;
+ }
+ return NULL;
+}
+