grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v19 22/33] key_protector: Add TPM2 Key Protector


From: Gary Lin
Subject: Re: [PATCH v19 22/33] key_protector: Add TPM2 Key Protector
Date: Fri, 20 Sep 2024 10:17:21 +0800

On Thu, Sep 19, 2024 at 11:05:13AM -0400, Stefan Berger wrote:
> 
> 
> On 9/19/24 3:45 AM, Gary Lin wrote:
> > On Wed, Sep 18, 2024 at 11:22:16AM -0400, Stefan Berger wrote:
> > > 
> > > 
> 
> > >     *handle = (TPM_HANDLE_t) num;
> > > 
> > How about this change?
> > 
> > - return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value %lu is too large to be a 
> > TPM handle, TPM handles are unsigned 32-bit integers", num);
> > + return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value " PRIuGRUB_UINT64_T " is 
> > too large to be a TPM handle, TPM handles are unsigned 32-bit integers", 
> > num);
> > 
> There's a missing "%" but it works for me:
> +    return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value %" PRIuGRUB_UINT64_T "
> is too large to be a TPM handle, TPM handles are unsigned 32-bit integers",
> num);
> 
Thanks! I'll update the string to fix the type error.

Gary Lin

> > Here we use the type macro to choose the correct type string for
> > 'grub_uint64_t' to avoid the potential compiler error.
> > 
> > Gary Lin



reply via email to

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