utils: Make the buffer size of `dump-port' a parameter.

* guix/build/utils.scm (dump-port): Make `buffer-size' a keyword
  parameter.
This commit is contained in:
Ludovic Courtès 2012-12-15 15:54:29 +01:00
parent a784c3077e
commit 74baf333bf
1 changed files with 3 additions and 3 deletions

View File

@ -364,9 +364,9 @@ all subject to the substitutions."
;;; Patching shebangs---e.g., /bin/sh -> /nix/store/xyz...-bash/bin/sh. ;;; Patching shebangs---e.g., /bin/sh -> /nix/store/xyz...-bash/bin/sh.
;;; ;;;
(define (dump-port in out) (define* (dump-port in out #:key (buffer-size 16384))
"Read as much data as possible from IN and write it to OUT." "Read as much data as possible from IN and write it to OUT, using
(define buffer-size 4096) chunks of BUFFER-SIZE bytes."
(define buffer (define buffer
(make-bytevector buffer-size)) (make-bytevector buffer-size))