disk/pata: Prepend log message with PATA
PATCH 1/1 disk/pata: Prepend log message with PATA
Seeing
no device connected
it’s not clear, what component this belongs to. So prepend it to log:
PATA: no device connected
--- grub-core/disk/pata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/disk/pata.c +1 -1
@@ -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
Signature · 1 line
2.30.1
Quoted 7 lines · On Mon, 1 Mar 2021 13:43:06 +0100 Paul Menzel <[email protected]> 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
Quoted 19 lines
Signed-off-by Paul Menzel <[email protected]>--- grub-core/disk/pata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)grub-core/disk/pata.c +1
-1@@ -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