diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-08-27 17:09:50 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-08-27 17:09:50 +0200 |
commit | 946c51e93303ff71dd5cc44db8a1c2d1d5914625 (patch) | |
tree | 03ce4608d1bbe66b4c09e461981152e52e76ee48 | |
parent | a5256582f5a554c0cbcf45d19bb751e60ea42ce9 (diff) | |
download | uci-946c51e93303ff71dd5cc44db8a1c2d1d5914625.tar.gz |
add get functions for savedir and confdir
-rw-r--r-- | lua/uci.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -632,6 +632,13 @@ done: } static int +uci_lua_get_confdir(lua_State *L) +{ + lua_pushstring(L, ctx->confdir); + return 1; +} + +static int uci_lua_set_confdir(lua_State *L) { int ret; @@ -643,6 +650,13 @@ uci_lua_set_confdir(lua_State *L) } static int +uci_lua_get_savedir(lua_State *L) +{ + lua_pushstring(L, ctx->savedir); + return 1; +} + +static int uci_lua_set_savedir(lua_State *L) { int ret; @@ -667,7 +681,9 @@ static const luaL_Reg uci[] = { { "revert", uci_lua_revert }, { "changes", uci_lua_changes }, { "foreach", uci_lua_foreach }, + { "get_confdir", uci_lua_get_confdir }, { "set_confdir", uci_lua_set_confdir }, + { "get_savedir", uci_lua_get_savedir }, { "set_savedir", uci_lua_set_savedir }, { NULL, NULL }, }; |