guix-commits
[Top][All Lists]
Advanced

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

107/197: installer: Do not allow the creation of invalid file-system spe


From: Danny Milosavljevic
Subject: 107/197: installer: Do not allow the creation of invalid file-system specificaitons.
Date: Mon, 3 Jul 2017 20:37:08 -0400 (EDT)

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

commit e0af416aa727c8028f994f27a035067d990a8f8d
Author: John Darrington <address@hidden>
Date:   Mon Jan 16 21:47:16 2017 +0100

    installer: Do not allow the creation of invalid file-system specificaitons.
    
    * gnu/system/installer/filesystems.scm (make-file-system-spec): Return #f 
if the
    filesystem type is not valid.
---
 gnu/system/installer/filesystems.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/system/installer/filesystems.scm 
b/gnu/system/installer/filesystems.scm
index e100bbd..fee17c0 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -62,12 +62,12 @@
 (define valid-file-system-types `(ext2 ext3 ext4 btrfs swap))
 
 (define (make-file-system-spec mount-point label type)
-  (let ((uuid (slurp "uuidgen" identity)))
-    (make-file-system-spec' mount-point label
-                            (if (memq (string->symbol type) 
valid-file-system-types)
+  (if (memq (string->symbol type) valid-file-system-types)
+      (let ((uuid (slurp "uuidgen" identity)))
+        (make-file-system-spec' mount-point label
                                 (string->symbol type)
-                                #f)
-                            (car uuid))))
+                                (car uuid)))
+      #f))
 
 
 



reply via email to

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