summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/mapped-devices.scm34
1 files changed, 18 insertions, 16 deletions
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index 00f235e6b6..31c50c4e40 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -25,6 +25,7 @@
   #:use-module (guix i18n)
   #:use-module ((guix diagnostics)
                 #:select (source-properties->location
+                          formatted-message
                           &fix-hint
                           &error-location))
   #:use-module (gnu services)
@@ -132,13 +133,13 @@ DEVICE must be a \"/dev\" file name."
     ;; "usb_storage"), not file names (e.g., "usb-storage.ko").  This is
     ;; OK because we have machinery that accepts both the hyphen and the
     ;; underscore version.
-    (raise (condition
-            (&message
-             (message (format #f (G_ "you may need these modules \
+    (raise (make-compound-condition
+            (formatted-message (G_ "you may need these modules \
 in the initrd for ~a:~{ ~a~}")
-                              device missing)))
-            (&fix-hint
-             (hint (format #f (G_ "Try adding them to the
+                               device missing)
+            (condition
+             (&fix-hint
+              (hint (format #f (G_ "Try adding them to the
 @code{initrd-modules} field of your @code{operating-system} declaration, along
 these lines:
 
@@ -151,9 +152,10 @@ these lines:
 
 If you think this diagnostic is inaccurate, use the @option{--skip-checks}
 option of @command{guix system}.\n")
-                           missing)))
-            (&error-location
-             (location (source-properties->location location)))))))
+                            missing))))
+            (condition
+             (&error-location
+              (location (source-properties->location location))))))))
 
 
 ;;;
@@ -215,13 +217,13 @@ option of @command{guix system}.\n")
         (if (uuid? source)
             (match (find-partition-by-luks-uuid (uuid-bytevector source))
               (#f
-               (raise (condition
-                       (&message
-                        (message (format #f (G_ "no LUKS partition with UUID '~a'")
-                                         (uuid->string source))))
-                       (&error-location
-                        (location (source-properties->location
-                                   (mapped-device-location md)))))))
+               (raise (make-compound-condition
+                       (formatted-message (G_ "no LUKS partition with UUID '~a'")
+                                          (uuid->string source))
+                       (condition
+                        (&error-location
+                         (location (source-properties->location
+                                    (mapped-device-location md))))))))
               ((? string? device)
                (check-device-initrd-modules device initrd-modules location)))
             (check-device-initrd-modules source initrd-modules location)))))