file-systems: The 'device' field can be a UUID (bytevector).

Previously a wrong-type-arg error would be raised when a file system
with a UUID (bytevector) field was encountered.

* gnu/system.scm (other-file-system-services)[device-mappings]: Check
whether FS's device is a string.
This commit is contained in:
Ludovic Courtès 2015-12-22 00:29:43 +01:00
parent be21979d85
commit ab64483f64

View file

@ -192,11 +192,14 @@ (define file-systems
(operating-system-file-systems os)))
(define (device-mappings fs)
(let ((device (file-system-device fs)))
(if (string? device)
(filter (lambda (md)
(string=? (string-append "/dev/mapper/"
(mapped-device-target md))
(file-system-device fs)))
(operating-system-mapped-devices os)))
device))
(operating-system-mapped-devices os))
'())))
(define (add-dependencies fs)
;; Add the dependencies due to device mappings to FS.