static struct uci_sectmap network_interface = {
.type = "interface",
.alloc_len = sizeof(struct uci_network),
- .init_section = network_init_interface,
- .add_section = network_add_interface,
+ .init = network_init_interface,
+ .add = network_add_interface,
.options = &network_interface_options[0].map,
.n_options = ARRAY_SIZE(network_interface_options),
.options_size = sizeof(struct my_optmap)
.type = "alias",
.options = network_alias_options,
.alloc_len = sizeof(struct uci_network),
- .init_section = network_init_alias,
- .add_section = network_add_alias,
+ .init = network_init_alias,
+ .add = network_add_alias,
.n_options = ARRAY_SIZE(network_alias_options),
};
if (!list_empty(&sd->list))
list_del(&sd->list);
- if (sd->sm->free_section)
- sd->sm->free_section(map, section);
+ if (sd->sm->free)
+ sd->sm->free(map, section);
for (i = 0; i < sd->allocmap_len; i++) {
ucimap_free_item(&sd->allocmap[i]);
section = (char *)sd + sizeof(struct uci_sectmap_data);
- err = sm->init_section(map, section, s);
+ err = sm->init(map, section, s);
if (err)
goto error;
continue;
section = (char *) sd + sizeof(struct uci_sectmap_data);
- if (sd->sm->add_section(map, section) != 0)
+ if (sd->sm->add(map, section) != 0)
ucimap_free_section(map, sd);
}
}
unsigned int alloc_len;
/* give the caller time to initialize the preallocated struct */
- int (*init_section)(struct uci_map *map, void *section, struct uci_section *s);
+ int (*init)(struct uci_map *map, void *section, struct uci_section *s);
/* pass the fully processed struct to the callback after the section end */
- int (*add_section)(struct uci_map *map, void *section);
+ int (*add)(struct uci_map *map, void *section);
/* let the callback clean up its own stuff in the section */
- int (*free_section)(struct uci_map *map, void *section);
+ int (*free)(struct uci_map *map, void *section);
/* list of option mappings for this section */
struct uci_optmap *options;