projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add support for multiple config_param_list::next pointers
[project/netifd.git]
/
config.c
diff --git
a/config.c
b/config.c
index
cc3e121
..
1e465c5
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-69,8
+69,8
@@
static void uci_array_to_blob(struct blob_buf *b, struct uci_option *o,
free(str);
}
free(str);
}
-static void uci_to_blob(struct blob_buf *b, struct uci_section *s,
- const struct config_param_list *p)
+static void
__
uci_to_blob(struct blob_buf *b, struct uci_section *s,
+
const struct config_param_list *p)
{
const struct blobmsg_policy *attr;
struct uci_element *e;
{
const struct blobmsg_policy *attr;
struct uci_element *e;
@@
-107,6
+107,16
@@
static void uci_to_blob(struct blob_buf *b, struct uci_section *s,
}
}
}
}
+static void uci_to_blob(struct blob_buf *b, struct uci_section *s,
+ const struct config_param_list *p)
+{
+ int i;
+
+ __uci_to_blob(b, s, p);
+ for (i = 0; i < p->n_next; i++)
+ uci_to_blob(b, s, p->next[i]);
+}
+
static void
config_parse_interface(struct uci_section *s)
{
static void
config_parse_interface(struct uci_section *s)
{
@@
-114,11
+124,11
@@
config_parse_interface(struct uci_section *s)
blob_buf_init(&b, 0);
uci_to_blob(&b, s, &interface_attr_list);
blob_buf_init(&b, 0);
uci_to_blob(&b, s, &interface_attr_list);
-
alloc_interface
(s->e.name, s, b.head);
+
interface_alloc
(s->e.name, s, b.head);
}
void
}
void
-config_
device_init
s(void)
+config_
init_device
s(void)
{
struct uci_element *e;
{
struct uci_element *e;
@@
-154,7
+164,7
@@
config_init_interfaces(const char *name)
uci_network = p;
config_init = true;
uci_network = p;
config_init = true;
- config_
device_init
s();
+ config_
init_device
s();
uci_foreach_element(&p->sections, e) {
struct uci_section *s = uci_to_section(e);
uci_foreach_element(&p->sections, e) {
struct uci_section *s = uci_to_section(e);