summary refs log tree commit diff
path: root/gnu/bootloader.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/bootloader.scm')
-rw-r--r--gnu/bootloader.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm
index e080b04568..122e350874 100644
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -43,7 +43,7 @@
             bootloader-configuration
             bootloader-configuration?
             bootloader-configuration-bootloader
-            bootloader-configuration-device
+            bootloader-configuration-target
             bootloader-configuration-menu-entries
             bootloader-configuration-default-entry
             bootloader-configuration-timeout
@@ -107,6 +107,8 @@
   (bootloader                      bootloader-configuration-bootloader)    ; <bootloader>
   (device                          bootloader-configuration-device         ; string
                                    (default #f))
+  (target                          %bootloader-configuration-target         ; string
+                                   (default #f))
   (menu-entries                    bootloader-configuration-menu-entries   ; list of <boot-parameters>
                                    (default '()))
   (default-entry                   bootloader-configuration-default-entry  ; integer
@@ -126,6 +128,15 @@
   (additional-configuration        bootloader-configuration-additional-configuration ; record
                                    (default #f)))
 
+(define (bootloader-configuration-target config)
+  (or (%bootloader-configuration-target config)
+      (let ((device (bootloader-configuration-device config)))
+        (when device
+          (issue-deprecation-warning
+           "The 'device' field of bootloader configurations is deprecated."
+           "Use 'target' instead."))
+        device)))
+
 
 ;;;
 ;;; Bootloaders.