summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-01-01 22:29:33 +0100
committerLudovic Courtès <ludo@gnu.org>2016-01-01 22:34:13 +0100
commit29824d80ec3b86bcf68afc1a9d903e2a3c479533 (patch)
treebefa47868ab222a8924c6ec9d72750d6ccee221d /gnu/system.scm
parentdaa8922abc63b2491490ad1898b613f5653a19b1 (diff)
downloadpatches-29824d80ec3b86bcf68afc1a9d903e2a3c479533.tar
patches-29824d80ec3b86bcf68afc1a9d903e2a3c479533.tar.gz
system: Allow the root file system to have a UUID.
This is a followup to ab64483. * gnu/system.scm (mapped-device-user): Check whether the title of FS is 'device before calling 'string=?'. * gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]: Likewise.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 6f7500f93a..acb7f15e4e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;;;
@@ -193,7 +193,7 @@ as 'needed-for-boot'."
(define (device-mappings fs)
(let ((device (file-system-device fs)))
- (if (string? device)
+ (if (string? device) ;title is 'device
(filter (lambda (md)
(string=? (string-append "/dev/mapper/"
(mapped-device-target md))
@@ -216,7 +216,8 @@ as 'needed-for-boot'."
"Return a file system among FILE-SYSTEMS that uses DEVICE, or #f."
(let ((target (string-append "/dev/mapper/" (mapped-device-target device))))
(find (lambda (fs)
- (string=? (file-system-device fs) target))
+ (and (eq? 'device (file-system-title fs))
+ (string=? (file-system-device fs) target)))
file-systems)))
(define (operating-system-user-mapped-devices os)