From 1ccd6f8e853be17fa4ec244a660fa53ffcec979f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 27 May 2020 17:40:14 +0200 Subject: [PATCH 1/7] system: 'system-linux-image-file-name' takes an optional parameter. * gnu/system.scm (system-linux-image-file-name): Make 'target' an optional parameter. --- gnu/system.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index d929187695..ab0a6dfc33 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 -- 2.26.2