mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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.
This commit is contained in:
parent
489d6c0dc0
commit
c5b1377840
1 changed files with 9 additions and 0 deletions
|
@ -1042,6 +1042,11 @@ (define-syntax-rule (with-null-output-ports exp ...)
|
|||
(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 @@ (define (format-user-partitions user-partitions)
|
|||
(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))
|
||||
|
|
Loading…
Reference in a new issue