aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-05-27 17:40:14 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-06 23:28:49 +0200
commit0c053a3973fbd8a62961998ca1b75152e8741229 (patch)
treed3a539dde7016a48c815a590930416a1444d1b34
parentb49caaa2b7f624c3395c8e872638282bcc420502 (diff)
downloadguix-0c053a3973fbd8a62961998ca1b75152e8741229.tar
guix-0c053a3973fbd8a62961998ca1b75152e8741229.tar.gz
system: 'system-linux-image-file-name' takes an optional parameter.
* gnu/system.scm (system-linux-image-file-name): Make 'target' an optional parameter.
-rw-r--r--gnu/system.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index ac8bbd1d16..61cbaef280 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -466,15 +466,15 @@ from the initrd."
"Return the list of swap services for OS."
(map swap-service (operating-system-swap-devices os)))
-(define* (system-linux-image-file-name)
- "Return the basename of the kernel image file for SYSTEM."
- ;; FIXME: Evaluate the conditional based on the actual current system.
- (let ((target (or (%current-target-system) (%current-system))))
- (cond
- ((string-prefix? "arm" target) "zImage")
- ((string-prefix? "mips" target) "vmlinuz")
- ((string-prefix? "aarch64" target) "Image")
- (else "bzImage"))))
+(define* (system-linux-image-file-name #:optional
+ (target (or (%current-target-system)
+ (%current-system))))
+ "Return the basename of the kernel image file for TARGET."
+ (cond
+ ((string-prefix? "arm" target) "zImage")
+ ((string-prefix? "mips" target) "vmlinuz")
+ ((string-prefix? "aarch64" target) "Image")
+ (else "bzImage")))
(define (operating-system-kernel-file os)
"Return an object representing the absolute file name of the kernel image of