guix-commits
[Top][All Lists]
Advanced

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

114/197: installer: Check that swap spaces have not been assigned mount


From: Danny Milosavljevic
Subject: 114/197: installer: Check that swap spaces have not been assigned mount points
Date: Mon, 3 Jul 2017 20:37:10 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit d8251423f458b907dbf2a9e52f0ff0ce22c002dc
Author: John Darrington <address@hidden>
Date:   Wed Jan 18 08:41:13 2017 +0100

    installer: Check that swap spaces have not been assigned mount points
    
    * gnu/system/installer/filesystems.scm (filesystem-task-incomplete?): Show 
an
    error if the user has tried to allocate a mount point to a swap filesystem.
---
 gnu/system/installer/filesystems.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/system/installer/filesystems.scm 
b/gnu/system/installer/filesystems.scm
index c7ff029..dec473d 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -82,6 +82,14 @@
    (and (not (find-mount-device "/" mount-points))
         (M_ "You must specify a mount point for the root (/)."))
 
+   (fold (lambda (x prev)
+           (or prev
+               (match x
+                      ((dev . ($ <file-system-spec> mp label type uuid))
+                       (if (and (eq? type 'swap) (not (zero? (string-length 
mp))))
+                           (gettext "Swap systems should not have a mount 
point")
+                           #f)))))
+         #f mount-points)
 
    (let ((non-absolute-list
           (fold (lambda (x prev)



reply via email to

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