jmd pushed a commit to branch wip-installer
in repository guix.
commit eda638c0a5fca8a8336d3d9770d3d96c34d1f24a
Author: John Darrington <[email protected]>
Date: Fri Jan 20 13:25:31 2017 +0100
installer: Remove redundant list of file system types.
* gnu/system/installer/filesystems.scm (valid-file-system-types) : Export
* gnu/system/installer/mount-point.scm (my-fields): Change from variable to
procedure.
---
gnu/system/installer/filesystems.scm | 5 +++--
gnu/system/installer/mount-point.scm | 10 +++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index a7fc4a4..0e69fdb 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -33,6 +33,7 @@
#:use-module (srfi srfi-9)
#:export (make-file-system-spec)
+ #:export (valid-file-system-types)
#:export (<file-system-spec>)
#:export (file-system-spec?)
#:export (file-system-spec-mount-point)
@@ -59,10 +60,10 @@
(type file-system-spec-type) ; symbol
(uuid file-system-spec-uuid))
-(define valid-file-system-types `(ext2 ext3 ext4 btrfs swap))
+(define valid-file-system-types `("ext2" "ext3" "ext4" "btrfs" "swap"))
(define (make-file-system-spec mount-point label type)
- (if (memq (string->symbol type) valid-file-system-types)
+ (if (member type valid-file-system-types)
(let ((uuid (slurp "uuidgen" identity)))
(make-file-system-spec' mount-point label
(string->symbol type)
diff --git a/gnu/system/installer/mount-point.scm
b/gnu/system/installer/mount-point.scm
index b7a1876..62cdbcc 100644
--- a/gnu/system/installer/mount-point.scm
+++ b/gnu/system/installer/mount-point.scm
@@ -35,10 +35,10 @@
((M_ str)
str)))
-(define my-fields `((mount-point ,(M_ "Mount Point") 40)
- (fs-type ,(M_ "File System Type")
- ("ext2" "ext3" "ext4" "btrfs" "swap"))
- (label ,(M_ "Label") 16)))
+(define (my-fields) `((mount-point ,(M_ "Mount Point") 40)
+ (fs-type ,(M_ "File System Type")
+ ,valid-file-system-types)
+ (label ,(M_ "Label") 16)))
(define (mount-point-refresh page)
(when (not (page-initialised? page))
@@ -121,7 +121,7 @@
(form (make-form
- my-fields
+ (my-fields)
(lambda (f)
(let ((field (get-current-field f)))
(if (eq? (field-symbol field) 'mount-point)