[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] grub-entries: take a list of numbers on input
From: |
cmmarusich |
Subject: |
[PATCH 06/10] grub-entries: take a list of numbers on input |
Date: |
Fri, 28 Oct 2016 03:07:23 -0700 |
From: Chris Marusich <address@hidden>
* guix/scripts/system.scm (grub-entries): Add an optional parameter which
allows the caller to limit the grub entries that get returned.
---
guix/scripts/system.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index a4f5c7b..2c80c2e 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -366,8 +366,10 @@ it atomically, and then run OS's activation script."
(date->string (time-utc->date time)
"~Y-~m-~d ~H:~M")))
-(define* (grub-entries #:optional (profile %system-profile))
- "Return a list of 'menu-entry' for the generations of PROFILE."
+(define* (grub-entries #:optional (profile %system-profile)
+ (numbers (generation-numbers profile)))
+ "Return a list of 'menu-entry' for the generations of PROFILE specified by
+NUMBERS, which is a list of generation numbers."
(define (system->grub-entry system number time)
(unless-file-not-found
(let* ((file (string-append system "/parameters"))
@@ -395,8 +397,7 @@ it atomically, and then run OS's activation script."
kernel-arguments))
(initrd initrd)))))
- (let* ((numbers (generation-numbers profile))
- (systems (map (cut generation-file-name profile <>)
+ (let* ((systems (map (cut generation-file-name profile <>)
numbers))
(times (map (lambda (system)
(unless-file-not-found
--
2.9.2
- Add system roll-back and switch-generation commands, cmmarusich, 2016/10/28
- [PATCH 01/10] * gnu/system.scm (<boot-parameters>): Add 'store-device' and 'store-fs-mount-point'., cmmarusich, 2016/10/28
- [PATCH 05/10] Rename previous-grub-entries to grub-entries, cmmarusich, 2016/10/28
- [PATCH 07/10] Factor out procedure: install-grub-config, cmmarusich, 2016/10/28
- [PATCH 06/10] grub-entries: take a list of numbers on input,
cmmarusich <=
- [PATCH 03/10] Refactor grub.cfg generation logic, cmmarusich, 2016/10/28
- [PATCH 09/10] Rename grub-entries to profile-grub-entries, cmmarusich, 2016/10/28
- [PATCH 02/10] Add 'device' field to <menu-entry>, cmmarusich, 2016/10/28
- [PATCH 04/10] Extract procedure: relative-generation-spec->number, cmmarusich, 2016/10/28
- [PATCH 10/10] Mention new 'guix system' features in the manual, cmmarusich, 2016/10/28
- [PATCH 08/10] Implement switch-generation and roll-back, cmmarusich, 2016/10/28
- Re: Add system roll-back and switch-generation commands, Ludovic Courtès, 2016/10/29