hurd: Add support for rumpdisk device names
PATCH 1/1 hurd: Add support for rumpdisk device names
On GNU/Hurd grub2 currently only looks at /dev/hd* and /dev/sd*. With rumpdisk we now also need to look at /dev/wd*
util/deviceiter.c +23 -0
@@ -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__ +/* The rest is SCSI 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 (); }
util/deviceiter.c
Quoted 9 lines · Samuel Thibault
On GNU/Hurd grub2 currently only looks at
/dev/hd*and/dev/sd*. With rumpdisk we now also need to look at/dev/wd*Signed-off-by Samuel Thibault <[email protected]>Index:
grub2-2.06/util/deviceiter.c
===================================================================util/deviceiter.c +0
-0
Hmmm... This file does not exist in the GRUB upstream. Am I missing something?
Quoted 16 lines
util/deviceiter.c +8
-0@@ -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;
util/deviceiter.c dmraid_end: · line 1053
Quoted 5 lines
util/deviceiter.c +2
-0@@ -1041,6 +1049,21 @@ dmraid_end:# endif /* HAVE_DEVICE_MAPPER */ #endif /* __linux__ */ +#ifdef __GNU__ +/* The rest is SCSI disks. */
s/is/are/?
... and are those really SCSI disks if you mention /dev/sd* in the commit message above?
util/deviceiter.c dmraid_end: · line 1065
Quoted 12 lines
util/deviceiter.c +12
-0+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__ */
Daniel
Daniel Kiper, le mar. 22 févr. 2022 14:42:57 +0100, a ecrit:
Quoted 12 lines · Samuel Thibault
util/deviceiter.c
Quoted 9 lines
On GNU/Hurd grub2 currently only looks at
/dev/hd*and/dev/sd*. With rumpdisk we now also need to look at/dev/wd*Signed-off-by Samuel Thibault <[email protected]>Index:
grub2-2.06/util/deviceiter.c
===================================================================util/deviceiter.c +0
-0Hmmm... This file does not exist in the GRUB upstream. Am I missing something?
Ah, that was removed indeed.
Quoted 7 lines
util/deviceiter.c dmraid_end: · line 1053
Quoted 2 lines
util/deviceiter.c +2
-0+#ifdef __GNU__ +/* The rest is SCSI disks. */ s/is/are/?
... and are those really SCSI disks if you mention
/dev/sd*in the commit message above?
Yes, there are different drivers which produce different namings.
Samuel