[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 04/15] types: Define GRUB_CHAR_BIT based on compiler macro
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v4 04/15] types: Define GRUB_CHAR_BIT based on compiler macro instead of using literal. |
Date: |
Mon, 16 Nov 2020 17:31:32 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Sun, Nov 15, 2020 at 10:42:39AM +0100, Patrick Steinhardt wrote:
> On Fri, Nov 06, 2020 at 10:44:24PM -0600, Glenn Washburn wrote:
> > Signed-off-by: Glenn Washburn <development@efficientek.com>
> > ---
> > include/grub/types.h | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/grub/types.h b/include/grub/types.h
> > index 035a4b528..495c86bb1 100644
> > --- a/include/grub/types.h
> > +++ b/include/grub/types.h
> > @@ -72,6 +72,14 @@
> > # endif
> > #endif
> >
> > +#ifndef __CHAR_BIT__
> > +#error __CHAR_BIT__ is not defined
> > +#elif __CHAR_BIT__ != 8
> > +#error __CHAR_BIT__ is not equal 8
> > +#else
> > +#define GRUB_CHAR_BIT __CHAR_BIT__
> > +#endif
> > +
>
> Nested defines typically use spaces:
Yeah, good point. Anyway, I will fix it before commiting.
> #ifndef __CHAR_BIT__
> # error __CHAR_BIT__ is not defined
> #elif __CHAR_BIT__ != 8
> # error __CHAR_BIT__ is not equal 8
> #else
> # define GRUB_CHAR_BIT __CHAR_BIT__
> #endif
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
- Re: [PATCH v4 02/15] cryptodisk: Rename offset in grub_cryptodisk_t to offset_sectors., (continued)
- [PATCH v4 06/15] luks2: Rename variable i to keyslot_idx in luks2_get_keyslot., Glenn Washburn, 2020/11/06
- [PATCH v4 01/15] cryptodisk: Rename total_length field in grub_cryptodisk_t to total_sectors., Glenn Washburn, 2020/11/06
- [PATCH v4 04/15] types: Define GRUB_CHAR_BIT based on compiler macro instead of using literal., Glenn Washburn, 2020/11/06
- [PATCH v4 03/15] luks2: Rename source disk variabled named 'disk' to 'source' as in luks.c., Glenn Washburn, 2020/11/06
- [PATCH v4 08/15] luks2: Split idx into three variables: keyslot_key, digest_key, segment_key., Glenn Washburn, 2020/11/06
- [PATCH v4 05/15] luks2: Use correct index variable when looping in luks2_get_keyslot., Glenn Washburn, 2020/11/06