mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
system: image: Support GPT vfat partitions.
* gnu/system/image.scm (system-disk-image): Support them. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
parent
76139eb253
commit
6e99c020b8
1 changed files with 14 additions and 5 deletions
|
@ -320,12 +320,21 @@ (define (partition->dos-type partition)
|
|||
file-system)))))))))
|
||||
|
||||
(define (partition->gpt-type partition)
|
||||
;; Return the genimage GPT partition type code corresponding to PARTITION.
|
||||
;; See https://github.com/pengutronix/genimage/blob/master/README.rst
|
||||
(let ((flags (partition-flags partition)))
|
||||
;; Return the genimage GPT partition type code corresponding to the
|
||||
;; given PARTITION. See:
|
||||
;; https://github.com/pengutronix/genimage/blob/master/README.rst
|
||||
(let ((flags (partition-flags partition))
|
||||
(file-system (partition-file-system partition)))
|
||||
(cond
|
||||
((member 'esp flags) "U")
|
||||
(else "L"))))
|
||||
((member 'esp flags) "U")
|
||||
((string-prefix? "ext" file-system) "L")
|
||||
((string=? file-system "vfat") "F")
|
||||
(else
|
||||
(raise (condition
|
||||
(&message
|
||||
(message
|
||||
(format #f (G_ "unsupported partition type: ~a")
|
||||
file-system)))))))))
|
||||
|
||||
(define (partition-image partition)
|
||||
;; Return as a file-like object, an image of the given PARTITION. A
|
||||
|
|
Loading…
Reference in a new issue