From 1631f4d37bffaaaabd542519015bc25ceaa29f0d Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 9 Oct 2023 17:25:18 -0300 Subject: [PATCH] isapnp: Remove debug code --- isapnp/isapnp.c | 7 +------ pcireg/pcireg.c | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/isapnp/isapnp.c b/isapnp/isapnp.c index 372d1a9..351b8a1 100644 --- a/isapnp/isapnp.c +++ b/isapnp/isapnp.c @@ -206,18 +206,13 @@ dump_resource_data(char *id) if (!memcmp(buf, "\x00\x00\x00\x00\x00\x00\x00\x00\x00", 9) || !memcmp(buf, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 9)) { printf("\n> Invalid header (all %02X)", buf[0]); goto done; - } else { - printf("\n> DEBUG: header: %02X %02X %02X %02X %02X %02X %02X %02X %02X", - buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], buf[8]); } /* Now dump the resources. */ j = 0; while (read_resource_data(&byte)) { - if ((byte == 0x00) || (byte == 0xff)) { - printf("\n> DEBUG: %02X resource", byte); + if ((byte == 0x00) || (byte == 0xff)) break; - } /* Determine the amount of bytes to skip depending on resource type. */ if (byte & 0x80) { /* large resource */ diff --git a/pcireg/pcireg.c b/pcireg/pcireg.c index f7c0196..61f1bf3 100644 --- a/pcireg/pcireg.c +++ b/pcireg/pcireg.c @@ -1046,7 +1046,7 @@ dump_steering_table(uint8_t mode) break; } if ((int) p > 0xfffff) { - printf("$PIR table not found in BIOS space.\n"); + printf("$PIR table not found in BIOS segment.\n"); retry_pir: printf("Try again without -m\n"); return 1; @@ -1061,7 +1061,7 @@ retry_pir: goto retry_pir; } table->len = i * sizeof(irq_routing_entry_t); - memcpy(&table->entry[0], &p[8], i * sizeof(irq_routing_entry_t)); /* byte 32 */ + memcpy(&table->entry[0], &p[8], table->len); /* byte 32 */ } else { /* Allocate real mode memory buffer for PCI BIOS. */ buf_size = 1024;