[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/20: installer: Raise condition when mklabel fails.
From: |
guix-commits |
Subject: |
11/20: installer: Raise condition when mklabel fails. |
Date: |
Wed, 2 Feb 2022 10:47:06 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit 0a74509a696671580c8a7dc768d26f414748bab5
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Sat Jan 15 14:50:03 2022 +0100
installer: Raise condition when mklabel fails.
* gnu/installer/parted.scm (mklabel): Do it.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
gnu/installer/parted.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index c8bb73ee64..e33ef5f8fd 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -635,8 +635,14 @@ determined by MAX-LENGTH-COLUMN procedure."
(define (mklabel device type-name)
"Create a partition table on DEVICE. TYPE-NAME is the type of the partition
table, \"msdos\" or \"gpt\"."
- (let ((type (disk-type-get type-name)))
- (disk-new-fresh device type)))
+ (let* ((type (disk-type-get type-name))
+ (disk (disk-new-fresh device type)))
+ (or disk
+ (raise
+ (condition
+ (&error)
+ (&message (message (format #f "Cannot create partition table of type
+~a on device ~a." type-name (device-path device)))))))))
;;
- branch master updated (8f58508327 -> 4943ac86e4), guix-commits, 2022/02/02
- 20/20: installer: Use system-wide guix for system init., guix-commits, 2022/02/02
- 11/20: installer: Raise condition when mklabel fails.,
guix-commits <=
- 01/20: installer: Add crash dump upload support., guix-commits, 2022/02/02
- 02/20: installer: Use define instead of let at top-level., guix-commits, 2022/02/02
- 04/20: installer: Use new installer-log-line everywhere., guix-commits, 2022/02/02
- 09/20: installer: Add installer-specific run command process., guix-commits, 2022/02/02
- 06/20: installer: Keep PATH inside the install container., guix-commits, 2022/02/02
- 12/20: installer: Fix run-file-textbox-page when edit-button is #f., guix-commits, 2022/02/02
- 17/20: installer: Use dynamic-wind to setup installer., guix-commits, 2022/02/02
- 13/20: installer: Replace run-command by invoke in newt/page.scm., guix-commits, 2022/02/02
- 03/20: installer: Generalize logging facility., guix-commits, 2022/02/02
- 15/20: installer: Use named prompt to abort or break installer steps., guix-commits, 2022/02/02