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:
parent
a784c3077e
commit
74baf333bf
|
@ -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))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue