[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/10] Add 'device' field to <menu-entry>
From: |
cmmarusich |
Subject: |
[PATCH 02/10] Add 'device' field to <menu-entry> |
Date: |
Fri, 28 Oct 2016 03:07:19 -0700 |
From: Chris Marusich <address@hidden>
* gnu/system/grub.scm (<menu-entry>): add field 'device'.
* gnu/system.scm (grub-configuration-file): use a dummy value for 'device'.
* guix/scripts/system.scm (previous-grub-entries): use a dummy value for
'device'.
In a future commit, we will restructure the grub.cfg generation logic to use
this information, to enable the implementation of 'guix system
switch-generation' and 'guix system roll-back'.
---
gnu/system.scm | 1 +
gnu/system/grub.scm | 4 +++-
guix/scripts/system.scm | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index ff84b63..f9f63a0 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -736,6 +736,7 @@ listed in OS. The C library expects to find it under
(file-system-device root-fs)))
(entries -> (list (menu-entry
(label label)
+ (device #f) ;; stub value, not used yet
(linux kernel)
(linux-arguments
(cons* (string-append "--root=" root-device)
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 249b415..859f33a 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2016 Chris Marusich <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -121,6 +122,7 @@ object denoting a file name."
menu-entry make-menu-entry
menu-entry?
(label menu-entry-label)
+ (device menu-entry-device) ; file system uuid, label, or #f
(linux menu-entry-linux)
(linux-arguments menu-entry-linux-arguments
(default '())) ; list of string-valued gexps
@@ -262,7 +264,7 @@ corresponding to old generations of the system."
(define entry->gexp
(match-lambda
- (($ <menu-entry> label linux arguments initrd)
+ (($ <menu-entry> label device linux arguments initrd)
;; Use the right file names for LINUX and STORE-FS in case STORE-FS is
;; not the "/" file system.
(let ((linux (strip-mount-point store-fs linux))
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 0519ab8..8f0b8cd 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <address@hidden>
;;; Copyright © 2016 Alex Kost <address@hidden>
+;;; Copyright © 2016 Chris Marusich <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -384,6 +385,7 @@ it atomically, and then run OS's activation script."
(label (string-append label " (#"
(number->string number) ", "
(seconds->string time) ")"))
+ (device #f) ; stub value, not used yet
(linux kernel)
(linux-arguments
(cons* (string-append "--root=" root-device)
--
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, 2016/10/28
- [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 <=
- [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