summary refs log tree commit diff
path: root/gnu/system/file-systems.scm
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-06-28 00:39:43 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-07-07 21:20:59 -0400
commit575b4b092d73403381277625794042a7b7253cfe (patch)
treedf2c8790b2f65eed732783eae584c8f065340867 /gnu/system/file-systems.scm
parent9110c2e9421b4f93b04411f72fcea90ae8511f3c (diff)
downloadguix-575b4b092d73403381277625794042a7b7253cfe.tar.gz
gnu: system: Move file-system->spec to (gnu system file-systems).
* gnu/system/linux-initrd.scm (file-system->spec): Move this...
* gnu/system/file-systems.scm: ... to here.
Diffstat (limited to 'gnu/system/file-systems.scm')
-rw-r--r--gnu/system/file-systems.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index cbaca88e15..b33f826b45 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -17,6 +17,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu system file-systems)
+  #:use-module (ice-9 match)
   #:use-module (guix gexp)
   #:use-module (guix records)
   #:use-module (guix store)
@@ -33,6 +34,8 @@
             file-system-check?
             file-system-create-mount-point?
 
+            file-system->spec
+
             %fuse-control-file-system
             %binary-format-file-system
             %shared-memory-file-system
@@ -95,6 +98,13 @@ file system."
   (or (%file-system-needed-for-boot? fs)
       (string=? "/" (file-system-mount-point fs))))
 
+(define (file-system->spec fs)
+  "Return a list corresponding to file-system FS that can be passed to the
+initrd code."
+  (match fs
+    (($ <file-system> device title mount-point type flags options _ check?)
+     (list device title mount-point type flags options check?))))
+
 (define %fuse-control-file-system
   ;; Control file system for Linux' file systems in user-space (FUSE).
   (file-system