From patchwork Thu May 9 17:45:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 13939 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6EF0516FDF; Thu, 9 May 2019 18:46:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0B47716FD6 for ; Thu, 9 May 2019 18:46:07 +0100 (BST) Received: from localhost ([127.0.0.1]:58709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOn7N-000818-Ev for patchwork@mira.cbaines.net; Thu, 09 May 2019 13:46:05 -0400 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 X-Loop: help-debbugs@gnu.org Subject: [bug#35657] [PATCH] installer: Create btrfs file system. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2019 17:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35657 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35657@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155742395930159 (code B ref -1); Thu, 09 May 2019 17:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2019 17:45:59 +0000 Received: from localhost ([127.0.0.1]:36319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOn7G-0007q7-NU for submit@debbugs.gnu.org; Thu, 09 May 2019 13:45:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOn7F-0007kS-GP for submit@debbugs.gnu.org; Thu, 09 May 2019 13:45:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:39714) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOn79-0002nn-DM for submit@debbugs.gnu.org; Thu, 09 May 2019 13:45:52 -0400 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 Received: from dayas.3.home (178.112.234.177.wireless.dyn.drei.com [178.112.234.177]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 2B82133614D2; Thu, 9 May 2019 19:45:43 +0200 (CEST) From: Danny Milosavljevic Date: Thu, 9 May 2019 19:45:37 +0200 Message-Id: <20190509174537.7407-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Tags: patch X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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))