]> git.e2factory.org Git - e2factory.git/commitdiff
Remove call_tool(), call_tool_argv() is the new king
authorTobias Ulmer <tu@emlix.com>
Tue, 19 Nov 2013 18:20:09 +0000 (19:20 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 338452e52c555093d0afb7e76ffcb94f34f1a23d..ccb3ff8ae20a6a5c1e197259c0b96e0238fc201e 100644 (file)
@@ -1978,33 +1978,6 @@ function e2lib.mkdir_recursive(path, mode)
     return true
 end
 
---- Call a tool.
--- @param tool Tool name as registered in the tools library (string).
--- @param args Arguments as a string. Caller is responsible for safe escaping.
--- @return True when the tool returned 0, false on error.
--- @return Error object on failure
-function e2lib.call_tool(tool, args)
-    local rc, re, cmd, flags, call
-
-    cmd, re = tools.get_tool(tool)
-    if not cmd then
-        return false, re
-    end
-
-    flags, re = tools.get_tool_flags(tool)
-    if not flags then
-        return false, re
-    end
-
-    call = string.format("%s %s %s", cmd, flags, args)
-    rc, re = e2lib.callcmd_log(call)
-    if not rc or rc ~= 0 then
-        return false, re
-    end
-
-    return true
-end
-
 --- Call a tool with an argument vector.
 -- @param tool Tool name as registered in the tools library (string).
 -- @param argv Vector of arguments, escaping is handled by the function