aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-22 00:29:43 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-22 00:29:43 +0100
commitab64483f648756570f6e9d4027c3b4854e43921c (patch)
tree16e13c7e5f215556d110f585611755e2fc26550b
parentbe21979d85304fedd5c0fb970ffc337d220eda7a (diff)
downloadpatches-ab64483f648756570f6e9d4027c3b4854e43921c.tar
patches-ab64483f648756570f6e9d4027c3b4854e43921c.tar.gz
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.
-rw-r--r--gnu/system.scm13
1 files 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.