aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-12-15 15:54:29 +0100
committerLudovic Courtès <ludo@gnu.org>2012-12-15 15:54:29 +0100
commit74baf333bf591cf3c91447d912d200783472d913 (patch)
tree3763030272b90b05d32f618de0ba3b91a74db815
parenta784c3077e7cdae5d8492aa540b86b8d32c9a696 (diff)
downloadpatches-74baf333bf591cf3c91447d912d200783472d913.tar
patches-74baf333bf591cf3c91447d912d200783472d913.tar.gz
utils: Make the buffer size of `dump-port' a parameter.
* guix/build/utils.scm (dump-port): Make `buffer-size' a keyword parameter.
-rw-r--r--guix/build/utils.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 8ae190f656..8f0eb66d39 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -364,9 +364,9 @@ all subject to the substitutions."
;;; Patching shebangs---e.g., /bin/sh -> /nix/store/xyz...-bash/bin/sh.
;;;
-(define (dump-port in out)
- "Read as much data as possible from IN and write it to OUT."
- (define buffer-size 4096)
+(define* (dump-port in out #:key (buffer-size 16384))
+ "Read as much data as possible from IN and write it to OUT, using
+chunks of BUFFER-SIZE bytes."
(define buffer
(make-bytevector buffer-size))