diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-03-25 15:59:28 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-04-04 00:30:52 +0200 |
| commit | c8d3b544599658042963832d737f28ce21f4aa45 (patch) | |
| tree | 7ef29cdd3cdac41b01d790056890c48506fd8bb1 /gnu | |
| parent | 4d758ddbd296c8a8c2cfd67011e6b5cfef98eef7 (diff) | |
file-systems: Correctly report mount failure diagnostics.
Previously the message would be something like:
shepherd[1]: could not mount partition efivarfs: ~A
* gnu/build/file-systems.scm (mount-file-system): On ‘system-error?’
destructure the arguments of C.
Change-Id: I4e84d8ce424dd1d07eae5e22389164479309bbfd
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7463
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/build/file-systems.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 33b035aa967..fda20ac10e7 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014-2018, 2020-2022 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014-2018, 2020-2022, 2026 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2017 David Craven <david@craven.ch> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> @@ -1455,9 +1455,14 @@ corresponds to the symbols listed in FLAGS." (raise c))) ((system-error? c) (format (current-error-port) - "could not mount partition ~a: ~a~%" + "could not mount partition '~a': ~a~%" (file-system-device fs) - (exception-message c)) + (string-trim-both + (call-with-output-string + (lambda (port) + (print-exception port #f + (exception-kind c) + (exception-args c)))))) (unless (file-system-mount-may-fail? fs) (raise c)))) (let* ((type (file-system-type fs)) |
