From c1261b3a5d5c704737e6a02538f014967cf05f3e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 31 Oct 2022 11:23:43 +0100 Subject: file-systems: Gracefully handle EMEDIUMTYPE in 'read-partitions'. * gnu/build/file-systems.scm (ENOENT-safe): Catch EMEDIUMTYPE and warn. --- gnu/build/file-systems.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/build') diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 0d7ff99f17..15b8f73312 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -899,6 +899,10 @@ caught and lead to a warning and #f as the result." (format (current-error-port) "warning: failed to read from device '~a'~%" device) #f) + ((= EMEDIUMTYPE errno) ;inaccessible, like DRBD secondaries + (format (current-error-port) + "warning: failed to open device '~a'~%" device) + #f) (else (apply throw args)))))))) -- cgit v1.2.3