summaryrefslogtreecommitdiff
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
parent489d6c0dc03f1d95a3fefa6301f36cac9b50b2c3 (diff)
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.
-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 7cc2217cbec..fc8c9de6f1d 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -1042,6 +1042,11 @@ bit bucket."
1042 (with-error-to-port (%make-void-port "w") 1042 (with-error-to-port (%make-void-port "w")
1043 (lambda () exp ...))))) 1043 (lambda () exp ...)))))
1044 1044
1045(define (create-btrfs-file-system partition)
1046 "Create an btrfs file-system for PARTITION file-name."
1047 (with-null-output-ports
1048 (invoke "mkfs.btrfs" "-f" partition)))
1049
1045(define (create-ext4-file-system partition) 1050(define (create-ext4-file-system partition)
1046 "Create an ext4 file-system for PARTITION file-name." 1051 "Create an ext4 file-system for PARTITION file-name."
1047 (with-null-output-ports 1052 (with-null-output-ports
@@ -1106,6 +1111,10 @@ NEED-FORMATING? field set to #t."
1106 (luks-format-and-open user-partition)) 1111 (luks-format-and-open user-partition))
1107 1112
1108 (case fs-type 1113 (case fs-type
1114 ((btrfs)
1115 (and need-formatting?
1116 (not (eq? type 'extended))
1117 (create-btrfs-file-system file-name)))
1109 ((ext4) 1118 ((ext4)
1110 (and need-formatting? 1119 (and need-formatting?
1111 (not (eq? type 'extended)) 1120 (not (eq? type 'extended))