From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:33476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOn7L-0007w9-3b for guix-patches@gnu.org; Thu, 09 May 2019 13:46:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOn7K-00034f-5z for guix-patches@gnu.org; Thu, 09 May 2019 13:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOn7K-00034E-2V for guix-patches@gnu.org; Thu, 09 May 2019 13:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOn7J-0007tA-Uw for guix-patches@gnu.org; Thu, 09 May 2019 13:46:01 -0400 Subject: [bug#35657] [PATCH] installer: Create btrfs file system. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:33447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOn78-0007Ni-FV for guix-patches@gnu.org; Thu, 09 May 2019 13:45:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOn76-0002lC-JO for guix-patches@gnu.org; Thu, 09 May 2019 13:45:50 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:48956) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOn76-0002iN-7b for guix-patches@gnu.org; Thu, 09 May 2019 13:45:48 -0400 From: Danny Milosavljevic Date: Thu, 9 May 2019 19:45:37 +0200 Message-Id: <20190509174537.7407-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35657@debbugs.gnu.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 ...))))) =20 +(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)) =20 (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))