aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-10-31 11:23:43 +0100
committerMarius Bakke <marius@gnu.org>2022-11-03 20:00:31 +0100
commitc1261b3a5d5c704737e6a02538f014967cf05f3e (patch)
treec1a946e12174238eb4cd74f71e286b76a051dde5 /gnu/build/file-systems.scm
parent706f25f24dab13dff69e7977b5d84269c1dfa293 (diff)
downloadguix-c1261b3a5d5c704737e6a02538f014967cf05f3e.tar
guix-c1261b3a5d5c704737e6a02538f014967cf05f3e.tar.gz
file-systems: Gracefully handle EMEDIUMTYPE in 'read-partitions'.
* gnu/build/file-systems.scm (ENOENT-safe): Catch EMEDIUMTYPE and warn.
Diffstat (limited to 'gnu/build/file-systems.scm')
-rw-r--r--gnu/build/file-systems.scm4
1 files changed, 4 insertions, 0 deletions
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))))))))