[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gnu: u-boot: Use scandir.
From: |
Danny Milosavljevic |
Subject: |
[PATCH] gnu: u-boot: Use scandir. |
Date: |
Thu, 26 Jan 2017 00:38:18 +0100 |
* gnu/packages/u-boot.scm (make-u-boot-package): Modify.
---
gnu/packages/u-boot.scm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm
index cdd52d874..6173e619a 100644
--- a/gnu/packages/u-boot.scm
+++ b/gnu/packages/u-boot.scm
@@ -99,19 +99,19 @@ also initializes the boards (RAM etc).")
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs make-flags #:allow-other-keys)
+ (use-modules ((ice-9 ftw)))
(let ((config-name (string-append ,board "_defconfig")))
(if (file-exists? (string-append "configs/" config-name))
(zero? (apply system* "make" `(,@make-flags ,config-name)))
(begin
(display "Invalid board name. Valid board names are:")
- (let ((dir (opendir "configs"))
- (suffix-length (string-length "_defconfig")))
- (do ((file-name (readdir dir) (readdir dir)))
- ((eof-object? file-name))
- (when (string-suffix? "_defconfig" file-name)
- (format #t "- ~A\n"
- (string-drop-right file-name
suffix-length))))
- (closedir dir))
+ (let ((suffix-length (string-length "_defconfig")))
+ (scandir "configs"
+ (lambda (file-name)
+ (when (string-suffix? "_defconfig" file-name)
+ (format #t "- ~A\n"
+ (string-drop-right file-name
+ suffix-length))))))
#f)))))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
- [PATCH] gnu: u-boot: Use scandir.,
Danny Milosavljevic <=