aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/bootloader.scm15
1 files changed, 10 insertions, 5 deletions
diff --git a/gnu/build/bootloader.scm b/gnu/build/bootloader.scm
index 498022f6db..5ec839f902 100644
--- a/gnu/build/bootloader.scm
+++ b/gnu/build/bootloader.scm
@@ -22,6 +22,8 @@
#:use-module (guix utils)
#:use-module (ice-9 binary-ports)
#:use-module (ice-9 format)
+ #:use-module (rnrs io ports)
+ #:use-module (rnrs io simple)
#:export (write-file-on-device
install-efi-loader))
@@ -35,11 +37,14 @@
(call-with-input-file file
(lambda (input)
(let ((bv (get-bytevector-n input size)))
- (call-with-output-file device
- (lambda (output)
- (seek output offset SEEK_SET)
- (put-bytevector output bv))
- #:binary #t)))))
+ (call-with-port
+ (open-file-output-port device
+ (file-options no-truncate no-create)
+ (buffer-mode block)
+ (native-transcoder))
+ (lambda (output)
+ (seek output offset SEEK_SET)
+ (put-bytevector output bv)))))))
;;;