mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
system: Streamline operating-system-boot-parameters-file a bit.
* gnu/system.scm (operating-system-boot-parameters-file) [SYSTEM-KERNEL-ARGUMENTS?]: Remove unused argument (it had no callers) and adjust doc, moving the self-referential tip to... * gnu/system.scm (operating-system-boot-parameters): ... here, reworded for clarity. Suggested-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
4a3b8f4d59
commit
91755fe6b2
1 changed files with 9 additions and 15 deletions
|
@ -1454,7 +1454,10 @@ (define* (operating-system-boot-parameters os root-device
|
|||
#:key system-kernel-arguments?)
|
||||
"Return a monadic <boot-parameters> record that describes the boot
|
||||
parameters of OS. When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments
|
||||
such as '--root' and '--load' to <boot-parameters>."
|
||||
such as '--root' and '--load' to <boot-parameters>. The
|
||||
SYSTEM-KERNEL-ARGUMENTS? should only be used in necessity, as the '--load' and
|
||||
'--system' values are self-referential (they refer to the system), thus
|
||||
susceptible to introduce a cyclic dependency."
|
||||
(let* ((initrd (and (not (operating-system-hurd os))
|
||||
(operating-system-initrd-file os)))
|
||||
(store (operating-system-store-file-system os))
|
||||
|
@ -1495,22 +1498,13 @@ (define (device->sexp device)
|
|||
(_
|
||||
device)))
|
||||
|
||||
(define* (operating-system-boot-parameters-file os
|
||||
#:key system-kernel-arguments?)
|
||||
"Return a file that describes the boot parameters of OS. The primary use of
|
||||
this file is the reconstruction of GRUB menu entries for old configurations.
|
||||
|
||||
When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments such as '--root'
|
||||
and '--load' to the returned file (since the returned file is then usually
|
||||
stored into the content-addressed \"system\" directory, it's usually not a
|
||||
good idea to give it because the content hash would change by the content hash
|
||||
being stored into the \"parameters\" file)."
|
||||
(define* (operating-system-boot-parameters-file os)
|
||||
"Return a file that describes the boot parameters of OS. The primary use
|
||||
of this file is the reconstruction of GRUB menu entries for old
|
||||
configurations."
|
||||
(let* ((root (operating-system-root-file-system os))
|
||||
(device (file-system-device root))
|
||||
(params (operating-system-boot-parameters
|
||||
os device
|
||||
#:system-kernel-arguments?
|
||||
system-kernel-arguments?)))
|
||||
(params (operating-system-boot-parameters os device)))
|
||||
(scheme-file "parameters"
|
||||
#~(boot-parameters
|
||||
(version #$(boot-parameters-version params))
|
||||
|
|
Loading…
Reference in a new issue