guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

94/197: installer: Add the notion of uuids to prospective filesystems.


From: Danny Milosavljevic
Subject: 94/197: installer: Add the notion of uuids to prospective filesystems.
Date: Mon, 3 Jul 2017 20:37:06 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 8a7b7d01e6f642893e094c9036ba2ed69dd6889f
Author: John Darrington <address@hidden>
Date:   Sun Jan 15 12:47:34 2017 +0100

    installer: Add the notion of uuids to prospective filesystems.
    
    * gnu/system/installer/filesystems.scm (<file-system-spec>) : Add uuid 
member.
---
 gnu/system/installer/filesystems.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/system/installer/filesystems.scm 
b/gnu/system/installer/filesystems.scm
index cba8333..0f65d44 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -34,9 +34,11 @@
 
   #:export (make-file-system-spec)
   #:export (<file-system-spec>)
+  #:export (file-system-spec?)
   #:export (file-system-spec-mount-point)
   #:export (file-system-spec-label)
   #:export (file-system-spec-type)
+  #:export (file-system-spec-uuid)
 
   #:export (minimum-store-size)
   #:export (filesystem-task-complete?)
@@ -45,11 +47,17 @@
 
 ;; File system spec declaration.
 (define-record-type <file-system-spec>
-  (make-file-system-spec mount-point label type)
+  (make-file-system-spec' mount-point label type uuid)
   file-system-spec?
-  (mount-point      file-system-spec-mount-point)      ; string
-  (label            file-system-spec-label)            ; string
-  (type             file-system-spec-type))             ; symbol
+  (mount-point      file-system-spec-mount-point)
+  (label            file-system-spec-label)      
+  (type             file-system-spec-type)
+  (uuid             file-system-spec-uuid))
+
+(define (make-file-system-spec mount-point label type)
+  (let ((uuid (slurp "uuidgen" identity)))
+    (make-file-system-spec' mount-point label type (car uuid))))
+
 
 
 (define minimum-store-size 7000)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]