grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] disk/pata: Prepend log message with PATA


From: Glenn Washburn
Subject: Re: [PATCH] disk/pata: Prepend log message with PATA
Date: Mon, 1 Mar 2021 12:36:26 -0600

On Mon,  1 Mar 2021 13:43:06 +0100
Paul Menzel <pmenzel@molgen.mpg.de> wrote:

> Seeing
> 
>     no device connected
> 
> it’s not clear, what component this belongs to. So prepend it to log:
> 
>     PATA: no device connected

I ran in to this just several days ago in the ehci_test, which may be
unrelated to how its showing up for you. The ehci_test runs the
"nativedisk" command to pull in the ehci module, but this also loads
the pata module and others. Without looking much further, I'm thinking
the pata module is printing that message when no pata disks are found.
There's only a usb mass storage disk and ATAPI(?) cdrom configured in
qemu.

So in addition to this patch, it would be nice to not have the pata
module print that message when no devices are found. Perhaps a
grub_dprintf would be better.

Glenn

Reviewed-by: Glenn Washburn <development@efficientek.com>

> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
>  grub-core/disk/pata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/grub-core/disk/pata.c b/grub-core/disk/pata.c
> index 23eef2be1..f9a3d3132 100644
> --- a/grub-core/disk/pata.c
> +++ b/grub-core/disk/pata.c
> @@ -294,7 +294,7 @@ check_device (struct grub_pata_device *dev)
>    grub_uint8_t sec = grub_pata_regget (dev, GRUB_ATA_REG_SECTORS);
>    grub_dprintf ("ata", "sectors=0x%x\n", sec);
>    if (sec != 0x5A)
> -    return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no device
> connected");
> +    return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "PATA: no device
> connected"); 
>    /* The above test may detect a second (slave) device
>       connected to a SATA controller which supports only one



reply via email to

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