From ab64483f648756570f6e9d4027c3b4854e43921c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 22 Dec 2015 00:29:43 +0100 Subject: 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. --- gnu/system.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 2b8821443a..6f7500f93a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -192,11 +192,14 @@ as 'needed-for-boot'." (operating-system-file-systems os))) (define (device-mappings fs) - (filter (lambda (md) - (string=? (string-append "/dev/mapper/" - (mapped-device-target md)) - (file-system-device fs))) - (operating-system-mapped-devices os))) + (let ((device (file-system-device fs))) + (if (string? device) + (filter (lambda (md) + (string=? (string-append "/dev/mapper/" + (mapped-device-target md)) + device)) + (operating-system-mapped-devices os)) + '()))) (define (add-dependencies fs) ;; Add the dependencies due to device mappings to FS. -- cgit 1.4.1