From b168945ea92dfa538abe06128b7236ea70ba9cfb Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Mon, 8 Jul 2013 16:11:12 +0200 Subject: [PATCH] Remove e2lib.callcmd_redirect(), unused Signed-off-by: Tobias Ulmer --- generic/e2lib.lua | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 76a35ae..4b76a5f 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -1013,27 +1013,6 @@ local function callcmd(infile, outfile, errfile, cmd) return (rc/256) end ---- callcmd_redirect: call a command with --- stdin redirected from /dev/null --- stdout/stderr redirected to a luafile object. -function e2lib.callcmd_redirect(cmd, out) - local devnull, pid, rc - devnull = luafile.open("/dev/null", "r") - if not devnull then - e2lib.abort("could not open /dev/null") - end - e2lib.logf(3, "+ %s", cmd) - pid = e2util.fork() - if pid == 0 then - rc = callcmd(devnull, out, out, cmd) - os.exit(rc) - else - rc = e2util.wait(pid) - luafile.close(devnull) - return rc - end -end - --- Call several commands in a pipe. -- @param cmds Table of shell commands. -- @param infile Luafile that is readable, or nil. -- 2.39.5