[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
117/197: installer: Remove unnecessary "begin".
From: |
Danny Milosavljevic |
Subject: |
117/197: installer: Remove unnecessary "begin". |
Date: |
Mon, 3 Jul 2017 20:37:10 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit d4fc6257b5e665fd31fbe0263ee6d9884b47faf4
Author: John Darrington <address@hidden>
Date: Wed Jan 18 13:41:46 2017 +0100
installer: Remove unnecessary "begin".
* gnu/system/installer/wireless.scm (get-wifi): Remove superfluous "begin".
---
gnu/system/installer/wireless.scm | 86 +++++++++++++++++++--------------------
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/gnu/system/installer/wireless.scm
b/gnu/system/installer/wireless.scm
index efaa87b..e26b257 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -181,49 +181,49 @@
s))
(define (get-wifi ifce)
- (begin (system* "ip" "link" "set" ifce "up")
- (fold
- (lambda (x prev)
- (let ((mtch (string-match "Cell [0-9][0-9] - " x)))
- (cond (mtch
- (cons
- (list
- `(address . ,
- (drop-prefix "Address: "
- (string-drop x (string-length
(match:substring mtch))))))
- prev))
-
- ((string-prefix? "Encryption key:" x)
- (cons
- (append (car prev)
- (list `(encryption .
- ,(string-suffix? "on" x))))
- (cdr prev)))
-
- ((string-prefix? "Quality=" x)
- (let ((lvl (string-match "level=(-?[0-9][0-9]*) dBm" x)))
- (if lvl
- (cons
- (append (car prev)
- (list
- `(signal . ,(string->number
(match:substring lvl 1))))
- )
- (cdr prev))
- prev)))
-
- ((string-prefix? "ESSID:" x)
- (cons
- (append (car prev)
- (list
- `(essid . ,(drop-prefix "ESSID:"
- (drop-quotes
- x))))
- )
- (cdr prev)))
-
- (else
- prev))))
- '() (scan-wifi ifce))))
+ (system* "ip" "link" "set" ifce "up")
+ (fold
+ (lambda (x prev)
+ (let ((mtch (string-match "Cell [0-9][0-9] - " x)))
+ (cond (mtch
+ (cons
+ (list
+ `(address . ,
+ (drop-prefix "Address: "
+ (string-drop x (string-length
(match:substring mtch))))))
+ prev))
+
+ ((string-prefix? "Encryption key:" x)
+ (cons
+ (append (car prev)
+ (list `(encryption .
+ ,(string-suffix? "on" x))))
+ (cdr prev)))
+
+ ((string-prefix? "Quality=" x)
+ (let ((lvl (string-match "level=(-?[0-9][0-9]*) dBm" x)))
+ (if lvl
+ (cons
+ (append (car prev)
+ (list
+ `(signal . ,(string->number (match:substring lvl
1))))
+ )
+ (cdr prev))
+ prev)))
+
+ ((string-prefix? "ESSID:" x)
+ (cons
+ (append (car prev)
+ (list
+ `(essid . ,(drop-prefix "ESSID:"
+ (drop-quotes
+ x))))
+ )
+ (cdr prev)))
+
+ (else
+ prev))))
+ '() (scan-wifi ifce)))
- 160/197: installer: New convenience procedures., (continued)
- 160/197: installer: New convenience procedures., Danny Milosavljevic, 2017/07/03
- 158/197: installer: Correct placement of gettext call., Danny Milosavljevic, 2017/07/03
- 163/197: gurses: Cache the windows of buttons., Danny Milosavljevic, 2017/07/03
- 172/197: gurses: Update the cursor position when posting the form., Danny Milosavljevic, 2017/07/03
- 165/197: installer: New procedure key-value-slurp., Danny Milosavljevic, 2017/07/03
- 175/197: gurses: Don't crash if asked for an item by an invalid index., Danny Milosavljevic, 2017/07/03
- 171/197: installer: New page to edit user accounts., Danny Milosavljevic, 2017/07/03
- 187/197: installer: Add procudure for starting a wireless interface., Danny Milosavljevic, 2017/07/03
- 192/197: installer: Only build if guile-ncurses is available., Danny Milosavljevic, 2017/07/03
- 68/197: installer: Add new page to set the system role., Danny Milosavljevic, 2017/07/03
- 117/197: installer: Remove unnecessary "begin".,
Danny Milosavljevic <=
- 113/197: installer: Explicitly set the #:panel parameter for window creation procedures., Danny Milosavljevic, 2017/07/03
- 122/197: gurses: Populate the choices box in forms., Danny Milosavljevic, 2017/07/03
- 128/197: installer: Remove redundant list of file system types., Danny Milosavljevic, 2017/07/03
- 115/197: installer: New procedure refresh*., Danny Milosavljevic, 2017/07/03
- 153/197: installer: Add optional arguments to addstr*., Danny Milosavljevic, 2017/07/03
- 97/197: installer: Whitespace changes only, Danny Milosavljevic, 2017/07/03
- 139/197: installer: Allow file system specifications to be removed., Danny Milosavljevic, 2017/07/03
- 136/197: installer: No passphrase is needed for clear networks., Danny Milosavljevic, 2017/07/03
- 138/197: installer: Clear the mount point field for swap file systems., Danny Milosavljevic, 2017/07/03
- 135/197: installer: Use a "hard" method of rebooting. Do not rely on shepherd., Danny Milosavljevic, 2017/07/03