mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
linux-initrd: Gracefully deal with partitions with no label.
* guix/build/linux-initrd.scm (partition-label-predicate): Check whether 'ext2-superblock-volume-name' returns #f, and return #f if it does.
This commit is contained in:
parent
b0e3635e0a
commit
1bb784ea05
1 changed files with 3 additions and 2 deletions
|
@ -180,8 +180,9 @@ (define (partition-label-predicate label)
|
|||
(let* ((device (string-append "/dev/" part))
|
||||
(sblock (read-ext2-superblock device)))
|
||||
(and sblock
|
||||
(string=? (ext2-superblock-volume-name sblock)
|
||||
label)))))
|
||||
(let ((volume (ext2-superblock-volume-name sblock)))
|
||||
(and volume
|
||||
(string=? volume label)))))))
|
||||
|
||||
(define (find-partition-by-label label)
|
||||
"Return the first partition found whose volume name is LABEL, or #f if none
|
||||
|
|
Loading…
Reference in a new issue