dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 9cbc2bee140685b0cf4c4389b7946cdbff6dbfa4
Author: John Darrington <[email protected]>
Date: Tue Jan 24 15:54:44 2017 +0100
installer: Clear the mount point field for swap file systems.
* gnu/system/installer/mount-point.scm (mount-point-page-init): Clear mount
point field for swap file systems or unused file systems.
---
gnu/system/installer/mount-point.scm | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/gnu/system/installer/mount-point.scm
b/gnu/system/installer/mount-point.scm
index 62cdbcc..794ec9f 100644
--- a/gnu/system/installer/mount-point.scm
+++ b/gnu/system/installer/mount-point.scm
@@ -37,7 +37,7 @@
(define (my-fields) `((mount-point ,(M_ "Mount Point") 40)
(fs-type ,(M_ "File System Type")
- ,valid-file-system-types)
+ ,(append valid-file-system-types (list
"<unused>")))
(label ,(M_ "Label") 16)))
(define (mount-point-refresh page)
@@ -124,11 +124,20 @@
(my-fields)
(lambda (f)
(let ((field (get-current-field f)))
- (if (eq? (field-symbol field) 'mount-point)
- (form-set-value! f 'label
- (string-append
- host-name "-"
- (form-get-value f
'mount-point)))))))))
+ (case (field-symbol field)
+ ((mount-point)
+ (form-set-value! f 'label
+ (string-append
+ host-name "-"
+ (form-get-value f 'mount-point))))
+ ((fs-type)
+ (cond
+ ((equal? "swap" (form-get-value f 'fs-type))
+ (form-set-value! f 'label "swap-space")
+ (form-set-value! f 'mount-point ""))
+ ((equal? "<unused>" (form-get-value f 'fs-type))
+ (form-set-value! f 'label "")
+ (form-set-value! f 'mount-point ""))))))))))
(page-set-datum! p 'navigation nav)
(let ((dev (page-datum p 'device)))