lua_newtable(L);
lua_pushstring(L, s->type);
- lua_setfield(L, -2, ".TYPE");
+ lua_setfield(L, -2, ".type");
+ lua_pushstring(L, s->e.name);
+ lua_setfield(L, -2, ".name");
uci_foreach_element(&s->options, e) {
struct uci_option *o = uci_to_option(e);
lua_setfield(L, -3, h->section);
}
- name = (h->e.name ? h->e.name : ".TYPE");
+ name = (h->e.name ? h->e.name : ".type");
if (h->value)
lua_pushstring(L, h->value);
else