mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
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
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; 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 © 2016, 2017 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
|
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
@@ -1455,9 +1455,14 @@ corresponds to the symbols listed in FLAGS."
|
|||||||
(raise c)))
|
(raise c)))
|
||||||
((system-error? c)
|
((system-error? c)
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"could not mount partition ~a: ~a~%"
|
"could not mount partition '~a': ~a~%"
|
||||||
(file-system-device fs)
|
(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)
|
(unless (file-system-mount-may-fail? fs)
|
||||||
(raise c))))
|
(raise c))))
|
||||||
(let* ((type (file-system-type fs))
|
(let* ((type (file-system-type fs))
|
||||||
|
|||||||
Reference in New Issue
Block a user