[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/18: installer: Raise condition when mklabel fails.
From: |
guix-commits |
Subject: |
10/18: installer: Raise condition when mklabel fails. |
Date: |
Mon, 17 Jan 2022 05:04:53 -0500 (EST) |
mothacehe pushed a commit to branch wip-harden-installer
in repository guix.
commit e91ddc728c2aa4d6c3b823f63089060b6c064267
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 wip-harden-installer updated (84d0d8ad3d -> 1e2f0cca1a), guix-commits, 2022/01/17
- 01/18: installer: Use define instead of let at top-level., guix-commits, 2022/01/17
- 07/18: installer: Capture external commands output., guix-commits, 2022/01/17
- 05/18: installer: Keep PATH inside the install container., guix-commits, 2022/01/17
- 18/18: installer: Make dump archive creation optional and selective., guix-commits, 2022/01/17
- 06/18: installer: Remove specific logging code., guix-commits, 2022/01/17
- 03/18: installer: Use new installer-log-line everywhere., guix-commits, 2022/01/17
- 04/18: installer: Un-export syslog syntax., guix-commits, 2022/01/17
- 08/18: installer: Add installer-specific run command process., guix-commits, 2022/01/17
- 09/18: installer: Use run-command-in-installer in (gnu installer parted)., guix-commits, 2022/01/17
- 10/18: installer: Raise condition when mklabel fails.,
guix-commits <=
- 14/18: installer: Use named prompt to abort or break installer steps., guix-commits, 2022/01/17
- 15/18: installer: Add error page when running external commands., guix-commits, 2022/01/17
- 17/18: installer: Turn passwords into opaque records., guix-commits, 2022/01/17
- 02/18: installer: Generalize logging facility., guix-commits, 2022/01/17
- 11/18: installer: Fix run-file-textbox-page when edit-button is #f., guix-commits, 2022/01/17
- 12/18: installer: Replace run-command by invoke in newt/page.scm., guix-commits, 2022/01/17
- 13/18: installer: Add nano to PATH., guix-commits, 2022/01/17
- 16/18: installer: Use dynamic-wind to setup installer., guix-commits, 2022/01/17