guix-patches
[Top][All Lists]
Advanced

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

[bug#35657] [PATCH] installer: Create btrfs file system.


From: Danny Milosavljevic
Subject: [bug#35657] [PATCH] installer: Create btrfs file system.
Date: Thu, 9 May 2019 19:45:37 +0200

* gnu/installer/parted.scm (create-btrfs-file-system): New procedure.
(format-user-partitions): Use it.
---
 gnu/installer/parted.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 7cc2217cbe..fc8c9de6f1 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -1042,6 +1042,11 @@ bit bucket."
       (with-error-to-port (%make-void-port "w")
         (lambda () exp ...)))))
 
+(define (create-btrfs-file-system partition)
+  "Create an btrfs file-system for PARTITION file-name."
+  (with-null-output-ports
+   (invoke "mkfs.btrfs" "-f" partition)))
+
 (define (create-ext4-file-system partition)
   "Create an ext4 file-system for PARTITION file-name."
   (with-null-output-ports
@@ -1106,6 +1111,10 @@ NEED-FORMATING? field set to #t."
          (luks-format-and-open user-partition))
 
        (case fs-type
+         ((btrfs)
+          (and need-formatting?
+               (not (eq? type 'extended))
+               (create-btrfs-file-system file-name)))
          ((ext4)
           (and need-formatting?
                (not (eq? type 'extended))





reply via email to

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