guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/06: vm: Filter out file systems that refer to UUIDs or labels.


From: Ludovic Courtès
Subject: 04/06: vm: Filter out file systems that refer to UUIDs or labels.
Date: Thu, 30 Nov 2017 12:15:16 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit f00515b4831cbeef7ef4ee9dcc0079ecdadb705b
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 30 16:14:12 2017 +0100

    vm: Filter out file systems that refer to UUIDs or labels.
    
    * gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
    Filter out things that refer to file system UUIDs or labels.
---
 gnu/system/vm.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 3ddb41d..a5fe48e 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -554,7 +554,13 @@ environment with the store shared with the host.  MAPPINGS 
is a list of
                 (or (string=? target (%store-prefix))
                     (string=? target "/")
                     (and (eq? 'device (file-system-title fs))
-                         (string-prefix? "/dev/" source)))))
+                         (string-prefix? "/dev/" source))
+
+                    ;; Labels and UUIDs are necessarily invalid in the VM.
+                    (and (file-system-mount? fs)
+                         (or (eq? 'label (file-system-title fs))
+                             (eq? 'uuid (file-system-title fs))
+                             (uuid? source))))))
             (operating-system-file-systems os)))
 
   (define virtual-file-systems



reply via email to

[Prev in Thread] Current Thread [Next in Thread]