]> git.e2factory.org Git - e2factory.git/commitdiff
e2lib: remove unused compute_hash()
authorTobias Ulmer <tu@emlix.com>
Mon, 17 Sep 2012 10:29:38 +0000 (12:29 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:10 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index f384bb323e8fb5e8c93cc2af2918aba06753afb7..fda1ceedf4baf4c5392cff0e663ce3e4ccd7a049 100644 (file)
@@ -1017,34 +1017,6 @@ function e2lib.directory(p, dotfiles, noerror)
     return nextfile, dir
 end
 
-
--- Hash value computation
---
---   Computes some hash value from data, which is fed into it
---   using an iterator function to be provided. The iterator
---   function is expected to accept one parameter value.
---
---     compute_hash(ITER, [VALUE...])
-
-function e2lib.compute_hash(iter, ...)
-    local n, f, s
-    local i, o, e, p = e2util.pipe("sha1sum")
-    if not i then bomb("cannot calculate hash sum: " .. o) end
-    for x in iter(...) do
-        n, f = e2util.write(i, x)
-        if not n then bomb(f) end
-    end
-    n, f = e2util.close(i)
-    if not n then bomb(f) end
-    s, f = e2util.read(o, 40)
-    if not s then bomb(f) end
-    n, f = e2util.close(o)
-    if not n then bomb(f) end
-    n, f = e2util.wait(p)
-    if not n then bomb(f) end
-    return s
-end
-
 -- callcmd: call a command, connecting
 --  stdin, stdout, stderr to luafile objects