[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: system: Streamline operating-system-boot-parameters-file a bit.
From: |
guix-commits |
Subject: |
02/06: system: Streamline operating-system-boot-parameters-file a bit. |
Date: |
Tue, 1 Mar 2022 13:28:05 -0500 (EST) |
apteryx pushed a commit to branch master
in repository guix.
commit 91755fe6b2e167be19561c5e8c64b6f9a99b7bcf
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Feb 28 17:05:14 2022 -0500
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>
---
gnu/system.scm | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 19e6262e96..95c42d33f6 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1454,7 +1454,10 @@ a list of <menu-entry>, to populate the \"old entries\"
menu."
#: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 @@ such as '--root' and '--load' to <boot-parameters>."
(_
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))
- branch master updated (a53ea46bfc -> c679120111), guix-commits, 2022/03/01
- 01/06: system: Add a version field to the <boot-parameters> record., guix-commits, 2022/03/01
- 02/06: system: Streamline operating-system-boot-parameters-file a bit.,
guix-commits <=
- 03/06: initrd: Use non-hyphenated kernel command-line parameter names., guix-commits, 2022/03/01
- 04/06: initrd: Honor rootfstype and rootflags command-line parameters., guix-commits, 2022/03/01
- 05/06: CODE-OF-CONDUCT: Update to version 2.1., guix-commits, 2022/03/01
- 06/06: CODE-OF-CONDUCT: Add a top notice., guix-commits, 2022/03/01