[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: image: Error out when passed an unsupported partition type.
From: |
guix-commits |
Subject: |
01/07: image: Error out when passed an unsupported partition type. |
Date: |
Thu, 5 Nov 2020 10:15:59 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 61d9c4458eef35a2a3fce94f113031d86b9f4d8d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 5 14:56:16 2020 +0100
image: Error out when passed an unsupported partition type.
* gnu/build/image.scm (make-partition-image): Use 'raise' instead of
'format' when TYPE is not supported.
(convert-disk-image): Remove unneeded 'begin'.
---
gnu/build/image.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 8a2d0eb..640a784 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -118,16 +118,16 @@ ROOT directory to populate the image."
((string=? type "vfat")
(make-vfat-image partition target root))
(else
- (format (current-error-port)
- "Unsupported partition type~%.")))))
+ (raise (condition
+ (&message
+ (message "unsupported partition type"))))))))
(define (convert-disk-image image format output)
"Convert IMAGE to OUTPUT according to the given FORMAT."
(case format
((compressed-qcow2)
- (begin
- (invoke "qemu-img" "convert" "-c" "-f" "raw"
- "-O" "qcow2" image output)))
+ (invoke "qemu-img" "convert" "-c" "-f" "raw"
+ "-O" "qcow2" image output))
(else
(copy-file image output))))
- branch master updated (552e9fc -> a5945a6), guix-commits, 2020/11/05
- 01/07: image: Error out when passed an unsupported partition type.,
guix-commits <=
- 05/07: pack: Do not include the host (guix config)., guix-commits, 2020/11/05
- 06/07: services: Remove imports of (ice-9 …) modules., guix-commits, 2020/11/05
- 07/07: gnu: chromium: Silent 'local-file' warning., guix-commits, 2020/11/05
- 04/07: shepherd: Remove dependency on (guix utils)., guix-commits, 2020/11/05
- 03/07: gexp: Warn when importing (guix config) or (ice-9 …)., guix-commits, 2020/11/05
- 02/07: gexp: Store the source code location in <gexp>., guix-commits, 2020/11/05