[PATCH] installer: Create btrfs file system.

DoneSubmitted by Danny Milosavljevic.
D
Danny Milosavljevic wrote on Thu May 09 19:45:37+0200 2019
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20190509174537.7407-1-dannym@scratchpost.org
* 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))
L
Ludovic Courtès wrote on Fri May 10 15:09:17+0200 2019
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 35657@debbugs.gnu.org)
877eay1mo2.fsf@gnu.org
Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> * gnu/installer/parted.scm (create-btrfs-file-system): New procedure.
> (format-user-partitions): Use it.

LGTM!

Actually I didn’t know one could choose Btrfs in the graphical
installer. :-) That’s in the manual partitioning scheme, right?

Thanks,
Ludo’.
D
Danny Milosavljevic wrote on Tue May 14 01:12:23+0200 2019
(no subject)
(address . control@debbugs.gnu.org)
20190514011223.54a13342@scratchpost.org
close 35657
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzZ+dcACgkQ5xo1VCww
uqUhYgf9ELiqgrG7Aey+Dwtmguwo7ijNs/sNmTIJE7X2z2Td+5C/+O4ThOzKfQ2r
AKr0KVhgyxgCbgmv2GKH424cINkmcatQdCSPZwJ4pvKIno9GX1PbEpUOF5RccjY5
mYOvDApCX+Q0hdm0pONuwjeVgCTsOGy01jqKt7awwzsujdoGLDVPiYxmvkFAdUw7
NlrqYduVEtE0RYnxJPeQUGwWkm9IX6ppalwCQDtAUS2OR7LM44ueIdUUMMfHSrHG
P2Fanf900lB42R2DAfaJxYn+SLv+XyReRsFLBKc5COK0iOKqfTFPrN3XxUY7+agv
3EbSooEfmSOINK2hBXzXKT9l9aMdsw==
=dD1L
-----END PGP SIGNATURE-----

?
Your comment

Comments via the web interface are not currently supported. To comment on this conversation send email to 35657@debbugs.gnu.org

2 participants
  • Danny Milosavljevic
  • Ludovic Courtès
Owner
unassigned
Severity
normal
Status
Done