summaryrefslogtreecommitdiff
path: root/guix/serialization.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-12-06 00:20:54 +0100
committerLudovic Courtès <ludo@gnu.org>2019-12-12 17:56:58 +0100
commit1d9a4456a83a197a47bf2bdebc6b60ae78e00cfc (patch)
tree241db86c3668638819c807f966589fd4d421b1d8 /guix/serialization.scm
parent4736d06f78e09883bdd24186c396cdd4e6a74a6f (diff)
serialization: Remove unused procedure.
* guix/serialization.scm (write-contents): Remove.
Diffstat (limited to 'guix/serialization.scm')
-rw-r--r--guix/serialization.scm18
1 files changed, 0 insertions, 18 deletions
diff --git a/guix/serialization.scm b/guix/serialization.scm
index cf263d321e..f793feb53d 100644
--- a/guix/serialization.scm
+++ b/guix/serialization.scm
@@ -199,24 +199,6 @@ substitute invalid byte sequences with question marks. This is a
(put-bytevector out buf 0 read)
(loop (- left read))))))))
-(define (write-contents file p size)
- "Write SIZE bytes from FILE to output port P."
- (define (call-with-binary-input-file file proc)
- ;; Open FILE as a binary file. This avoids scan-for-encoding, and thus
- ;; avoids any initial buffering. Disable file name canonicalization to
- ;; avoid stat'ing like crazy.
- (with-fluids ((%file-port-name-canonicalization #f))
- (let ((port (open-file file "rb")))
- (dynamic-wind
- (const #t)
- (cut proc port)
- (lambda ()
- (close-port port))))))
-
- (call-with-binary-input-file file
- (lambda (input)
- (write-contents-from-port input p size))))
-
(define (write-contents-from-port input output size)
"Write SIZE bytes from port INPUT to port OUTPUT."
(write-string "contents" output)