grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hurd: Add support for rumpdisk device names


From: Daniel Kiper
Subject: Re: [PATCH] hurd: Add support for rumpdisk device names
Date: Tue, 22 Feb 2022 14:42:57 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Feb 22, 2022 at 12:48:45AM +0100, Samuel Thibault wrote:
> 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 <samuel.thibault@ens-lyon.org>
>
> Index: grub2-2.06/util/deviceiter.c
> ===================================================================
> --- grub2-2.06.orig/util/deviceiter.c
> +++ grub2-2.06/util/deviceiter.c

Hmmm... This file does not exist in the GRUB upstream. Am I missing something?

> @@ -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.  */

s/is/are/?

... and are those really SCSI disks if you mention /dev/sd* in the
commit message above?

> +  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]