DIRECT SENDER IS HERE LETS DEAL. JENS EBERHARD
MT103/202 DIRECT WIRE TRANSFER PAYPAL TRANSFER CASHAPP TRANSFER ZELLE TRANSFER TRANSFER WISE WESTERN UNION TRANSFER BITCOIN FLASHING BANK ACCOUNT LOADING/FLASHING IBAN TO IBAN TRANSFER MONEYGRAM TRANSFER SLBC PROVIDER CREDIT CARD TOP UP SEPA TRANSFER WIRE TRANSFER GLOBALPAY INC US Thanks. NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT. DM ME ON WHATSAPP FOR A SERIOUS DEAL. +447405129573 On Friday 8 December 2023 at 07:34:39 UTC-8 Michael Adler wrote: > This commit changes the default verbosity setting for the FAT parser to > false, aligning it with the general efibootguard behavior where > verbosity is not enabled by default. Users can still opt-in for verbose > output by using the -v or --verbose flag. > > Signed-off-by: Michael Adler <[email protected]> > --- > tools/ebgpart.c | 2 +- > tools/fat.c | 10 ++++++---- > tools/fat.h | 2 +- > tools/tests/test_fat.c | 21 +++++++++++++-------- > 4 files changed, 21 insertions(+), 14 deletions(-) > > diff --git a/tools/ebgpart.c b/tools/ebgpart.c > index b6384f2..298d766 100644 > --- a/tools/ebgpart.c > +++ b/tools/ebgpart.c > @@ -124,7 +124,7 @@ static int check_GPT_FAT_entry(int fd, const struct > EFIpartitionentry *e) > strerror(errno)); > return -1; > } > - return determine_FAT_bits(&header); > + return determine_FAT_bits(&header, verbosity); > } > > static inline EbgFileSystemType fat_size_to_fs_type(int fat_size) > diff --git a/tools/fat.c b/tools/fat.c > index 0ff0f64..6b055dd 100644 > --- a/tools/fat.c > +++ b/tools/fat.c > @@ -22,9 +22,11 @@ > #include "linux_util.h" > #include "ebgpart.h" > > -static bool verbosity = true; > - > -#define fat_msg(sb, lvl, ...) do { VERBOSE(stderr, __VA_ARGS__); > VERBOSE(stderr, "\n"); } while(0); > +#define fat_msg(sb, lvl, ...) \ > + do { \ > + fprintf(stderr, __VA_ARGS__); \ > + fprintf(stderr, "\n"); \ > + } while (0); > #define KERN_ERR "ERROR" > > > /****************************************************************************** > @@ -147,7 +149,7 @@ out: > /* end of Linux kernel code */ > > /*****************************************************************************/ > > -int determine_FAT_bits(const struct fat_boot_sector *sector) > +int determine_FAT_bits(const struct fat_boot_sector *sector, bool > verbosity) > { > struct fat_bios_param_block bpb; > if (fat_read_bpb(NULL, sector, !verbosity, &bpb)) { > diff --git a/tools/fat.h b/tools/fat.h > index 8c991ab..d0cf3c7 100644 > --- a/tools/fat.h > +++ b/tools/fat.h > @@ -22,4 +22,4 @@ > * to ensure it is a valid FAT boot sector. If the provided boot sector is > not valid or an error > * occurs during the determination process, the function returns a value > less than or equal to 0. > */ > -int determine_FAT_bits(const struct fat_boot_sector *sector); > +int determine_FAT_bits(const struct fat_boot_sector *sector, bool > verbosity); > diff --git a/tools/tests/test_fat.c b/tools/tests/test_fat.c > index 2c5089f..42e0133 100644 > --- a/tools/tests/test_fat.c > +++ b/tools/tests/test_fat.c > @@ -34,7 +34,7 @@ START_TEST(test_determine_FAT_bits_empty) > { > struct fat_boot_sector sector; > memset(§or, 0, sizeof(sector)); > - int ret = determine_FAT_bits(§or); > + int ret = determine_FAT_bits(§or, true); > ck_assert_int_eq(ret, 0); > } > END_TEST > @@ -48,7 +48,7 @@ START_TEST(test_determine_FAT_bits_sec_per_clus_zero) > .media = 0xf8, > }; > u16_to_le(512, sector.sector_size); > - int ret = determine_FAT_bits(§or); > + int ret = determine_FAT_bits(§or, true); > ck_assert_int_eq(ret, 0); > } > END_TEST > @@ -62,7 +62,7 @@ START_TEST(test_determine_FAT_bits_fat_sector_size_zero) > .fats = 16, > .media = 0xf8, > }; > - int ret = determine_FAT_bits(§or); > + int ret = determine_FAT_bits(§or, true); > ck_assert_int_eq(ret, 0); > } > END_TEST > @@ -124,7 +124,8 @@ START_TEST(test_determine_FAT_bits_12) > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > 0x55, 0xaa, > }; > - int ret = determine_FAT_bits((const struct fat_boot_sector*) §or); > + int ret = determine_FAT_bits((const struct fat_boot_sector *)§or, > + true); > ck_assert_int_eq(ret, 12); > } > END_TEST > @@ -186,7 +187,8 @@ START_TEST(test_determine_FAT_bits_16) > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > 0x55, 0xaa, > }; > - int ret = determine_FAT_bits((const struct fat_boot_sector*) §or); > + int ret = determine_FAT_bits((const struct fat_boot_sector *)§or, > + true); > ck_assert_int_eq(ret, 16); > } > END_TEST > @@ -248,7 +250,8 @@ START_TEST(test_determine_FAT_bits_32) > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > 0x55, 0xaa, > }; > - int ret = determine_FAT_bits((const struct fat_boot_sector*) §or); > + int ret = determine_FAT_bits((const struct fat_boot_sector *)§or, > + true); > ck_assert_int_eq(ret, 32); > } > END_TEST > @@ -312,7 +315,8 @@ START_TEST(test_determine_FAT_bits_fat16_swupdate) > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > 0x55, 0xaa, > }; > - int ret = determine_FAT_bits((const struct fat_boot_sector*) §or); > + int ret = determine_FAT_bits((const struct fat_boot_sector *)§or, > + true); > ck_assert_int_eq(ret, 16); > } > END_TEST > @@ -373,7 +377,8 @@ START_TEST(test_determine_FAT_bits_squashfs) > 0xd7, 0x40, 0xc1, 0xcc, 0x43, 0x7b, 0xbf, 0x8d, 0x76, 0x39, > 0x3c, 0xd5, > }; > - int ret = determine_FAT_bits((const struct fat_boot_sector *)§or); > + int ret = determine_FAT_bits((const struct fat_boot_sector *)§or, > + true); > ck_assert_int_eq(ret, 0); > } > END_TEST > -- > 2.42.0 > > -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/d4c6598e-359b-41a6-863c-e39cb55d001fn%40googlegroups.com.
