]> git.e2factory.org Git - e2factory.git/commitdiff
Remove e2lib.callcmd_redirect(), unused
authorTobias Ulmer <tu@emlix.com>
Mon, 8 Jul 2013 14:11:12 +0000 (16:11 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:01:23 +0000 (15:01 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 76a35ae8cf98778c23a35c5fd69d1b9471d933d5..4b76a5f9df4c194d162bfab5b92fd0e2378f953a 100644 (file)
@@ -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.