X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=ucimap-example.c;h=9906592acabff3e4551da001b769497b680fa648;hp=157c32f583020ff361ec25200f10c1ce222fa098;hb=96aa070d01e676a6c7f48ff533e219f63da4fd65;hpb=2be6befa78ee4b38681d23a9772434314eec3cf8 diff --git a/ucimap-example.c b/ucimap-example.c index 157c32f..9906592 100644 --- a/ucimap-example.c +++ b/ucimap-example.c @@ -170,7 +170,7 @@ static struct my_optmap network_interface_options[] = { { .map = { UCIMAP_OPTION(struct uci_network, aliases), - .type = UCIMAP_LIST | UCIMAP_SECTION, + .type = UCIMAP_LIST | UCIMAP_SECTION | UCIMAP_LIST_AUTO, .data.sm = &network_alias } } @@ -250,7 +250,7 @@ int main(int argc, char **argv) (net->enabled ? "on" : "off")); for (i = 0; i < net->aliases->n_items; i++) { - alias = net->aliases->item[i].section; + alias = net->aliases->item[i].ptr; printf("New alias: %s\n", alias->name); } #if 0