From bfe6a0afaa718c88061ee70f2ce970ae8a3ba69d Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 21 Apr 2023 20:36:28 -0400 Subject: [PATCH] etdump: warn only once for non El Torito bootable ISO images Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39869 --- usr.bin/etdump/etdump.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/etdump/etdump.c b/usr.bin/etdump/etdump.c index b234fc9d7ff..e393eba61a8 100644 --- a/usr.bin/etdump/etdump.c +++ b/usr.bin/etdump/etdump.c @@ -167,9 +167,8 @@ dump_eltorito(FILE *iso, const char *filename, FILE *outfile, bvd = (boot_volume_descriptor *)buffer; if (memcmp(bvd->identifier, ISO_VOLUME_DESCRIPTOR_STANDARD_ID, 5) != 0) warnx("%s: not a valid ISO", filename); - if (bvd->boot_record_indicator[0] != ISO_VOLUME_DESCRIPTOR_BOOT) - warnx("%s: not an El Torito bootable ISO", filename); - if (memcmp(bvd->boot_system_identifier, ET_ID, 23) != 0) + if (bvd->boot_record_indicator[0] != ISO_VOLUME_DESCRIPTOR_BOOT || + memcmp(bvd->boot_system_identifier, ET_ID, 23) != 0) warnx("%s: not an El Torito bootable ISO", filename); boot_catalog = isonum_731(bvd->boot_catalog_pointer);