From 63fa031f949d272aa604c635839cd280c598b58f Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 19 Nov 2013 19:20:09 +0100 Subject: [PATCH] Remove call_tool(), call_tool_argv() is the new king Signed-off-by: Tobias Ulmer --- generic/e2lib.lua | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 338452e..ccb3ff8 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -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 -- 2.39.5