0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 02:53:49 +01:00

Move and clean up utils.lua.

This commit is contained in:
Wouter R 2013-07-08 13:43:59 +02:00
parent ea8100ab60
commit 915d1cd900
3 changed files with 2 additions and 22 deletions

View File

@ -1,4 +1,4 @@
local u = require("util")
local u = require("util.utils")
local l = require("logger")
local uci = require("uci").cursor()

View File

@ -1,5 +1,5 @@
local reconf = require("network.netconfig")
local util = require("util")
local util = require("util.utils")
local l = require("logger")
local uci = require("uci").cursor()
local iwinfo = require("iwinfo")

View File

@ -2,26 +2,6 @@ local uci = require("uci").cursor()
local M = {}
function M.printWithSuccess(msg)
if msg ~= nil and msg ~= "" then print("OK," .. msg)
else print("OK") end
end
function M.exitWithSuccess(msg)
if msg ~= nil and msg ~= "" then print("OK," .. msg)
else print("OK") end
os.exit(0)
end
function M.exitWithWarning(msg)
if msg ~= nil and msg ~= "" then print("WARN," .. msg)
else print("OK") end
os.exit(0)
end
function M.exitWithError(msg)
if msg ~= nil and msg ~= "" then print("ERR," .. msg)
else print("OK") end
os.exit(1)
end
function M.getUciSectionName(config, type)
local sname = nil
uci:foreach(config, type, function(s) sname = s[".name"] end)