[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
24/26: installer: Remove redundant list of file system types.
From: |
John Darrington |
Subject: |
24/26: installer: Remove redundant list of file system types. |
Date: |
Sun, 22 Jan 2017 12:09:25 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit eda638c0a5fca8a8336d3d9770d3d96c34d1f24a
Author: John Darrington <address@hidden>
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)
- 17/26: installer: Note which types of file system are supported., (continued)
- 17/26: installer: Note which types of file system are supported., John Darrington, 2017/01/22
- 25/26: installer: Emphasise that writing filesystems destroys existing data., John Darrington, 2017/01/22
- 05/26: installer: Fix bug where the selected item of main page was not indicated., John Darrington, 2017/01/22
- 08/26: gurses: form: Use match instead of car, cdr etc., John Darrington, 2017/01/22
- 03/26: installer: Do not allow the creation of invalid file-system specificaitons., John Darrington, 2017/01/22
- 15/26: gurses: Allow menu update to work for panel windows., John Darrington, 2017/01/22
- 18/26: gurses: Populate the choices box in forms., John Darrington, 2017/01/22
- 06/26: installer: Add an explanatory text to the main page., John Darrington, 2017/01/22
- 22/26: installer: mount-points page: Enlarge the forms window., John Darrington, 2017/01/22
- 13/26: installer: Remove unnecessary "begin"., John Darrington, 2017/01/22
- 24/26: installer: Remove redundant list of file system types.,
John Darrington <=
- 20/26: gurses: Populate dropdown boxes in forms using a menu., John Darrington, 2017/01/22
- 12/26: installer: Fix bug in config generation., John Darrington, 2017/01/22
- 26/26: doc: Remove the text which mentions there is no graphical installer., John Darrington, 2017/01/22
- 19/26: installer: Add a popup window for forms which have multiple choice fields., John Darrington, 2017/01/22
- 16/26: gurses: Mini refactor., John Darrington, 2017/01/22
- 09/26: installer: Explicitly set the #:panel parameter for window creation procedures., John Darrington, 2017/01/22
- 11/26: installer: New procedure refresh*., John Darrington, 2017/01/22
- 23/26: gurses: Remove box from form popup window., John Darrington, 2017/01/22