From c8d3b544599658042963832d737f28ce21f4aa45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 25 Mar 2026 15:59:28 +0100 Subject: [PATCH] file-systems: Correctly report mount failure diagnostics. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Merges: #7463 --- gnu/build/file-systems.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 33b035aa96..fda20ac10e 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 +;;; Copyright © 2014-2018, 2020-2022, 2026 Ludovic Courtès ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2019 Guillaume Le Vaillant @@ -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))