guix-commits
[Top][All Lists]
Advanced

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

17/21: installer: Add new procedure to get the list of volumes.


From: John Darrington
Subject: 17/21: installer: Add new procedure to get the list of volumes.
Date: Thu, 22 Dec 2016 19:58:40 +0000 (UTC)

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

commit e89e95566f827f337b87a29d7e049f8425e45846
Author: John Darrington <address@hidden>
Date:   Thu Dec 22 18:05:16 2016 +0100

    installer: Add new procedure to get the list of volumes.
    
    * gnu/system/installer/partition-reader.scm (volumes): New procedure.
---
 gnu/system/installer/partition-reader.scm |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/system/installer/partition-reader.scm 
b/gnu/system/installer/partition-reader.scm
index 65c7107..c0db6a7 100644
--- a/gnu/system/installer/partition-reader.scm
+++ b/gnu/system/installer/partition-reader.scm
@@ -36,7 +36,7 @@
 
            find-partition
            
-           disk-volumes)
+            volumes)
   
   #:use-module (ice-9 rdelim)
   #:use-module (ice-9 match)
@@ -178,6 +178,11 @@ number of Megabytes"
   "Return a list of disk volumes on the current machine"
   (assemble-partitions (read-partition-info) '() '()))
 
+(define (volumes)
+  "Return a list of disk volumes on the current machine, excluding mappers"
+  (filter (lambda (v) (not (equal? "dm" (disk-type v))))
+         (disk-volumes)))
+
 
 
 (define (device-id  pr)



reply via email to

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