grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 12/13] error: Use format code llu for 64-bit uint bp->blk_


From: Daniel Kiper
Subject: Re: [PATCH v5 12/13] error: Use format code llu for 64-bit uint bp->blk_prop in grub_error
Date: Thu, 4 Mar 2021 18:59:53 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Mar 03, 2021 at 07:29:17PM -0600, Glenn Washburn wrote:
> For some reason PRIuGRUB_UINT64_T is not expanding to llu, but to lu, which
> causes the format string check to fail. Use literal and force cast until
> this is debugged.

We know the problem and how to fix it at this point. Though we do not
want to fix it because... So, please fix the commit message and explain
everything in it.

Additionally, I will take this and #13 patch if you provide now another
patchset on top of this one which properly fixes the issue as we
discussed earlier. This way I will be sure that we have a proper fix
for the issue ready for apply after 2.06 release.

By the way, if you rework this patchset please fix PRIx* and cast
formatting in all patches as I asked for in earlier comments.

...and I am OK with lines a bit longer than 80 chars if this increases
readability. So, do not hesitate to use that...

Daniel

> Signed-off-by: Glenn Washburn <development@efficientek.com>
> ---
>  grub-core/fs/zfs/zfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
> index b6e1e178d..a3691d220 100644
> --- a/grub-core/fs/zfs/zfs.c
> +++ b/grub-core/fs/zfs/zfs.c
> @@ -1869,8 +1869,8 @@ zio_read (blkptr_t *bp, grub_zfs_endian_t endian, void 
> **buf,
>      {
>        if (BPE_GET_ETYPE(bp) != BP_EMBEDDED_TYPE_DATA)
>       return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
> -                        "unsupported embedded BP (type=%u)\n",
> -                        BPE_GET_ETYPE(bp));
> +                        "unsupported embedded BP (type=%llu)\n",
> +                        (long long unsigned int)BPE_GET_ETYPE(bp));
>        lsize = BPE_GET_LSIZE(bp);
>        psize = BF64_GET_SB(grub_zfs_to_cpu64 ((bp)->blk_prop, endian), 25, 7, 
> 0, 1);
>      }



reply via email to

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