grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3] loader/i386/linux.c Correct wrong initrd address for debu


From: Daniel Kiper
Subject: Re: [PATCH v3] loader/i386/linux.c Correct wrong initrd address for debug
Date: Thu, 23 Feb 2023 15:09:12 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Feb 21, 2023 at 07:42:51AM +0800, Jeremy Szu wrote:
> The 'addr' is used to request the memory with specific ranges but the
> real loadable address come from the relocator.
> Thus, print the final retrieved addresses (virtual and physical) for
> initrd.
>
> v2: append SOB
>
> v3: fix wrong code base
>
> Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
> ---
>  grub-core/loader/i386/linux.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
> index 10a367629..cbe975318 100644
> --- a/grub-core/loader/i386/linux.c
> +++ b/grub-core/loader/i386/linux.c
> @@ -1123,8 +1123,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ 
> ((unused)),
>    if (grub_initrd_load (&initrd_ctx, initrd_mem))
>      goto fail;
>
> -  grub_dprintf ("linux", "Initrd, addr=0x%x, size=0x%x\n",
> -             (unsigned) addr, (unsigned) size);
> +  grub_dprintf ("linux", "Initrd (%p) at 0x%" PRIxGRUB_ADDR ", size=0x%x\n",
> +             initrd_mem, initrd_mem_target, (unsigned) size);

I am not sure why you stopped in changing format specifiers half way.
The size argument deserves similar change to PRIxGRUB_SIZE. I can do it
for you before push...

Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>...

Daniel



reply via email to

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