(define (partition->dos-type partition)
;; Return the MBR partition type corresponding to the given PARTITION.
(let ((flags (partition-flags partition)))
(cond
((member 'esp flags) "0xEF")
(else "0x83"))))
(define (partition->gpt-type partition)
;; Return the genimage GPT partition type code corresponding to PARTITION.
(let ((flags (partition-flags partition)))
(cond
((member 'esp flags) "U")
(else "L"))))