🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #1277

Bug#1006495: hurd: Add probing for wd disks

#1277
From: Samuel Thibault
Date: Sun, 18 Oct 2026 15:30
106 lines
4294 bytes
--ThvahNRGpe0+tMqf
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Hello,

Samuel Thibault, le sam. 26 févr. 2022 12:55:28 +0100, a ecrit:
> The Hurd is moving to rump-based disk drivers, which are named wd*. We
> thus need grub2 to probe for them so as to propose them for installing
> grub. The attached patch implements this.

Here is an updated patch, as well as an additional patch for the
/dev/ud* files (USB disk)

Samuel

--ThvahNRGpe0+tMqf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=hurd-wd

Index: grub2-2.06/util/deviceiter.c
===================================================================
--- grub2-2.06.orig/util/deviceiter.c
+++ grub2-2.06/util/deviceiter.c
@@ -392,6 +392,14 @@ get_fio_disk_name (char *name, int unit)
 }
 #endif
 
+#ifdef __GNU__
+static void
+get_rump_disk_name (char *name, int unit)
+{
+  sprintf (name, "/dev/wd%d", unit);
+}
+#endif
+
 static struct seen_device
 {
   struct seen_device *next;
@@ -1041,6 +1049,21 @@ dmraid_end:
 # endif /* HAVE_DEVICE_MAPPER */
 #endif /* __linux__ */
 
+#ifdef __GNU__
+  /* Rump-supported disks.  */
+  for (i = 0; i < 96; i++)
+    {
+      char name[16];
+
+      get_rump_disk_name (name, i);
+      if (check_device_readable_unique (name))
+	{
+	  if (hook (name, 0, hook_data))
+	    goto out;
+	}
+    }
+#endif /* __GNU__ */
+
 out:
   clear_seen_devices ();
 }

--ThvahNRGpe0+tMqf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=hurd-ud

Index: grub2-2.12/util/deviceiter.c
===================================================================
--- grub2-2.12.orig/util/deviceiter.c
+++ grub2-2.12/util/deviceiter.c
@@ -398,6 +398,12 @@ get_rump_disk_name (char *name, int unit
 {
   sprintf (name, "/dev/wd%d", unit);
 }
+
+static void
+get_rump_usb_disk_name (char *name, int unit)
+{
+  sprintf (name, "/dev/ud%d", unit);
+}
 #endif
 
 static struct seen_device
@@ -1059,6 +1065,19 @@ dmraid_end:
       if (check_device_readable_unique (name))
 	{
 	  if (hook (name, 0, hook_data))
+	    goto out;
+	}
+    }
+
+  /* Rump-supported USB disks.  */
+  for (i = 0; i < 96; i++)
+    {
+      char name[16];
+
+      get_rump_usb_disk_name (name, i);
+      if (check_device_readable_unique (name))
+	{
+	  if (hook (name, 0, hook_data))
 	    goto out;
 	}
     }

--ThvahNRGpe0+tMqf--
Technical Details
Message-ID: <NPAZH-6mdW-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod
References: <DV3TX-4sEU-1@gated-at.bofh.it> <DV3TX-4sEU-1@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Samuel Thibault <sthibault@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1006495: hurd: Add probing for wd disks
Date: Sun, 18 Oct 2026 17:30:01 +0200
Message-ID: <NPAZH-6mdW-5@gated-at.bofh.it>
References: <DV3TX-4sEU-1@gated-at.bofh.it> <DV3TX-4sEU-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Oct 18 15:21:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Samuel Thibault <sthibault@debian.org>, 1006495@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-grub-devel@alioth-lists.debian.net
X-Debian-Pr-Message: followup 1006495
X-Debian-Pr-Package: grub-common
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: grub2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="ThvahNRGpe0+tMqf"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Organization: I am not organized
X-Debian-User: sthibault
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1997411
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 106
Sender: robomod@news.nic.it
X-Original-Cc: Debian Bug Tracking System <submit@bugs.debian.org>
X-Original-Date: Sun, 18 Oct 2026 17:20:04 +0200
X-Original-Message-ID: <atTjpCuEpAbG9YSA@end>
X-Original-References: <20220226115528.psbdnepknszzkahh@begin> <20220226115528.psbdnepknszzkahh@begin>