On Thu, Feb 03, 2022 at 03:43:00PM +0100, Mark Kettenis wrote:
> > Date: Thu, 3 Feb 2022 13:58:21 +0000
> > From: Visa Hankala <[email protected]>
> > 
> > On Wed, Feb 02, 2022 at 01:23:56PM -0700, Theo de Raadt wrote:
> > > Miod Vallat <[email protected]> wrote:
> > > 
> > > > > Index: usr.sbin/installboot/armv7_installboot.c
> > > > > ===================================================================
> > > > > RCS file: src/usr.sbin/installboot/armv7_installboot.c,v
> > > > > retrieving revision 1.11
> > > > > diff -u -p -r1.11 armv7_installboot.c
> > > > > --- usr.sbin/installboot/armv7_installboot.c  20 Jul 2021 14:51:56 
> > > > > -0000      1.11
> > > > > +++ usr.sbin/installboot/armv7_installboot.c  2 Feb 2022 14:11:08 
> > > > > -0000
> > > > > @@ -55,6 +55,19 @@
> > > > >  
> > > > >  #include "installboot.h"
> > > > >  
> > > > > +#if defined(__aarch64__)
> > > > > +#define BOOTEFI_SRC  "BOOTAA64.EFI"
> > > > > +#define BOOTEFI_DST  "bootaa64.efi"
> > > > > +#elif defined(__arm__)
> > > > > +#define BOOTEFI_SRC  "BOOTARM.EFI"
> > > > > +#define BOOTEFI_DST  "bootarm.efi"
> > > > > +#elif defined(__riscv)
> > > > > +#define BOOTEFI_SRC  "BOOTRISCV64.EFI"
> > > > > +#define BOOTEFI_DST  "bootriscv64.efi"
> > > > > +#else
> > > > > +#error "unhandled architecture"
> > > > > +#endif
> > > > 
> > > > Wouldn't these defines better set at the Makefile level, since there is
> > > > already logic to pick different files depending upon the architecture?
> 
> I'd prefer to keep the names in the .c file, especially if the result
> is that they're scatter though the Makefile instead of in a single
> block.

I agree. Putting definitions in a Makefile also sort of hides them.

Reply via email to