diff options
author | Miguel Ángel Arruga Vivas <rosen644835@gmail.com> | 2019-10-21 12:23:40 +0200 |
---|---|---|
committer | Miguel Ángel Arruga Vivas <rosen644835@gmail.com> | 2020-10-18 15:32:54 +0200 |
commit | 9d449b945bbad5b7c66ed874b347f7f0ffd012e1 (patch) | |
tree | d8251f33744c7286499bf4fb5f94b02ef19f2c22 /gnu/system.scm | |
parent | 1e3024540645894098b0ca6be5abb0f9f1987269 (diff) |
system: Add locale to boot-parameters.
* gnu/system.scm (define-module)[export]: Add boot-parameters-locale.
(<boot-parameters>)[locale]: New field.
[boot-parameters-locale]: New accessor.
(read-boot-parameters): Read locale field.
(operating-system-boot-parameters): Provide operating-system locale to
boot-parameters record.
(opeating-system-boot-parameters-file): Likewise.
* Makefile.am (SCM_TESTS): Add tests/boot-parameters.scm.
* tests/boot-parameters.scm: New test file.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index 59dfeb99b4..e8fe41cc24 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019 Meiyo Peng <meiyo.peng@gmail.com> +;;; Copyright © 2019 Miguel Ángel Arruga Vivas <rosen644835@gmail.com> ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de> @@ -148,6 +149,7 @@ boot-parameters-bootloader-menu-entries boot-parameters-store-device boot-parameters-store-mount-point + boot-parameters-locale boot-parameters-kernel boot-parameters-kernel-arguments boot-parameters-initrd @@ -297,6 +299,7 @@ directly by the user." boot-parameters-bootloader-menu-entries) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) + (locale boot-parameters-locale) (kernel boot-parameters-kernel) (kernel-arguments boot-parameters-kernel-arguments) (initrd boot-parameters-initrd) @@ -374,6 +377,11 @@ file system labels." ((_ args) args) (#f '()))) + (locale + (match (assq 'locale rest) + ((_ locale) locale) + (#f #f))) + (store-device ;; Linux device names like "/dev/sda1" are not suitable GRUB device ;; identifiers, so we just filter them out. @@ -1284,6 +1292,7 @@ such as '--root' and '--load' to <boot-parameters>." (let* ((initrd (and (not (operating-system-hurd os)) (operating-system-initrd-file os))) (store (operating-system-store-file-system os)) + (locale (operating-system-locale os)) (bootloader (bootloader-configuration-bootloader (operating-system-bootloader os))) (bootloader-name (bootloader-name bootloader)) @@ -1302,6 +1311,7 @@ such as '--root' and '--load' to <boot-parameters>." (bootloader-name bootloader-name) (bootloader-menu-entries (bootloader-configuration-menu-entries (operating-system-bootloader os))) + (locale locale) (store-device (ensure-not-/dev (file-system-device store))) (store-mount-point (file-system-mount-point store))))) @@ -1354,6 +1364,7 @@ being stored into the \"parameters\" file)." (or (and=> (operating-system-bootloader os) bootloader-configuration-menu-entries) '()))) + (locale #$(boot-parameters-locale params)) (store (device #$(device->sexp (boot-parameters-store-device params))) |