gnu: system: Fix bootloader crypto device recognition.

* gnu/system.scm (operating-system-bootloader-crypto-devices): Check for
luks-device-mapping-with-options in addition to luks-device-mapping.

Change-Id: Iafc9afe608640b97083c4d559c9240846330472a
This commit is contained in:
Lilah Tascheter 2024-08-06 19:11:20 -05:00 committed by Ryan Schanzenbacher
parent bddc831845
commit 33894a8d17
Signed by: ryan77627
GPG key ID: 81B0E222A3E2308E

View file

@ -402,13 +402,16 @@ (define operating-system-bootloader-crypto-devices
(mlambdaq (os) ;to avoid duplicated output (mlambdaq (os) ;to avoid duplicated output
"Return the sources of the LUKS mapped devices specified by UUID." "Return the sources of the LUKS mapped devices specified by UUID."
;; XXX: Device ordering is important, we trust the returned one. ;; XXX: Device ordering is important, we trust the returned one.
(let* ((luks-devices (filter (lambda (m) ;; Check against the close-luks-device procedure to get both maptypes.
(eq? luks-device-mapping (let* ((close (compose mapped-device-kind-close mapped-device-type))
(mapped-device-type m))) (luks (mapped-device-kind-close luks-device-mapping))
(operating-system-boot-mapped-devices os))) (luks? (lambda (m) (eq? (close m) luks)))
(uuid-crypto-devices non-uuid-crypto-devices (os-devices (operating-system-boot-mapped-devices os))
(partition (compose uuid? mapped-device-source) (luks-devices (filter luks? os-devices))
luks-devices))) (uuid? (compose uuid? mapped-device-source))
(uuid-crypto-devices
non-uuid-crypto-devices
(partition uuid? luks-devices)))
(when (not (null? non-uuid-crypto-devices)) (when (not (null? non-uuid-crypto-devices))
(for-each (lambda (dev) (for-each (lambda (dev)
(warning (warning