GNU bug report logs - #29409
GuixSD ARM port.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Thu, 23 Nov 2017 09:46:01 UTC

Severity: normal

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: m.othacehe <at> gmail.com
Cc: 29409 <at> debbugs.gnu.org
Subject: [bug#29409] [PATCH 4/4] bootloader: Factorize write-file-on-device.
Date: Mon, 11 Dec 2017 17:40:00 +0100
m.othacehe <at> gmail.com skribis:

> From: Mathieu Othacehe <m.othacehe <at> gmail.com>
>
> * gnu/bootloader/extlinux.scm (install-extlinux): Factorize bootloader
>   writing in a new procedure ...
> * gnu/bootloader.scm (write-file-on-device): ... defined and exported here.

LGTM!

> +(define write-file-on-device
> +  #~(lambda (file size device offset)
> +      ;; Write SIZE bytes from FILE to DEVICE starting at OFFSET.
> +      (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))))))

Eventually we might want to move it to (gnu build vm) or to create a new
(gnu build bootloader) module with build-side code for bootloaders.

Thanks!

Ludo’.




This bug report was last modified 7 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.