* libs/uci: Added function get_statevalue
authorSteven Barth <steven@midlink.org>
Sun, 6 Jul 2008 10:56:04 +0000 (10:56 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 6 Jul 2008 10:56:04 +0000 (10:56 +0000)
libs/uci/luasrc/model/uci.lua

index 6662943..e8700ef 100644 (file)
@@ -67,6 +67,13 @@ function section(config, type, name, values)
        return stat and name
 end
 
+function get_statevalue(...)
+       set_savedir(savedir_state)
+       local result = get(...)
+       set_savedir(savedir_default)
+       return result
+end
+
 function tset(config, section, values)
        local stat = true
        for k, v in pairs(values) do