Subject: bug#58924: closed (Re: [bug#58924] [PATCH] file-systems: Gracefully handle EMEDIUMTYPE in 'read-partitions'.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 03 Nov 2022 19:08:02 +0000

Your bug report

#58924: [PATCH] file-systems: Gracefully handle EMEDIUMTYPE in 'read-partitions'.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
58924: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58924
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#58924] [PATCH] file-systems: Gracefully handle EMEDIUMTYPE in 'read-partitions'.
From: Marius Bakke <[email-masked]>
To: [email-masked]
Date: Thu, 03 Nov 2022 20:06:56 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Marius Bakke <[email-masked]> skriver:

> * gnu/build/file-systems.scm (ENOENT-safe): Catch EMEDIUMTYPE and warn.

Pushed in c1261b3a5d5c704737e6a02538f014967cf05f3e.

Subject: [PATCH] file-systems: Gracefully handle EMEDIUMTYPE in 'read-partitions'.
From: Marius Bakke <[email-masked]>
To: [email-masked]
Date: Mon, 31 Oct 2022 11:27:21 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/build/file-systems.scm (ENOENT-safe): Catch EMEDIUMTYPE and warn.
---
 gnu/build/file-systems.scm | 4 ++++
 1 file changed, 4 insertions(+)

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 @@ (define (ENOENT-safe proc)
                  (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))))))))
 
-- 
2.38.0