summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2019-05-09 19:45:37 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2019-05-14 00:44:03 +0200
commitc5b1377840c3397e73de0d9f29bce60f8a91c286 (patch)
tree93e388f2d964aeb5fd485bb10810093b9910eeaf /gnu
parent489d6c0dc03f1d95a3fefa6301f36cac9b50b2c3 (diff)
downloadpatches-c5b1377840c3397e73de0d9f29bce60f8a91c286.tar
patches-c5b1377840c3397e73de0d9f29bce60f8a91c286.tar.gz
installer: Create btrfs file system.
Fixes <https://bugs.gnu.org/35655>. * gnu/installer/parted.scm (create-btrfs-file-system): New procedure. (format-user-partitions): Use it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/installer/parted.scm9
1 files changed, 9 insertions, 0 deletions
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))