guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: installer: parted: Add debug output.


From: guix-commits
Subject: branch master updated: installer: parted: Add debug output.
Date: Sun, 08 Nov 2020 13:41:20 -0500

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8c287bb  installer: parted: Add debug output.
8c287bb is described below

commit 8c287bb2fb169c6b47c14cf2b7f7e5c06e2682db
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun Nov 8 19:38:31 2020 +0100

    installer: parted: Add debug output.
    
    * gnu/installer/parted.scm (mkpart): Log partition creation.
---
 gnu/installer/parted.scm | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index f2352c5..f592d31 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -758,11 +758,33 @@ cause them to cross."
                                                       dev-constraint))
               (no-constraint (constraint-any device))
               ;; Try to create a partition with an optimal alignment
-              ;; constraint. If it fails, fallback to creating a partition with
-              ;; no specific constraint.
+              ;; constraint. If it fails, fallback to creating a partition
+              ;; with no specific constraint.
+              (partition-constraint-ok?
+               (disk-add-partition disk partition final-constraint))
+              (partition-no-contraint-ok?
+               (or partition-constraint-ok?
+                   (disk-add-partition disk partition no-constraint)))
               (partition-ok?
-               (or (disk-add-partition disk partition final-constraint)
-                   (disk-add-partition disk partition no-constraint))))
+               (or partition-constraint-ok? partition-no-contraint-ok?)))
+         (syslog "Creating partition:
+~/type: ~a
+~/filesystem-type: ~a
+~/start: ~a
+~/end: ~a
+~/start-range: [~a, ~a]
+~/end-range: [~a, ~a]
+~/constraint: ~a
+~/no-constraint: ~a
+"
+                 partition-type
+                 (filesystem-type-name filesystem-type)
+                 start-sector*
+                 end-sector
+                 (geometry-start start-range) (geometry-end start-range)
+                 (geometry-start end-range) (geometry-end end-range)
+                 partition-constraint-ok?
+                 partition-no-contraint-ok?)
          ;; Set the partition name if supported.
          (when (and partition-ok? has-name? name)
            (partition-set-name partition name))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]