From: Michael Brown Date: Thu, 24 Aug 2006 17:56:46 +0000 (+0000) Subject: Always update the PnP checksum, even if the ident string is not being set. X-Git-Tag: v0.9.3~1073 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=028bc034e44d45350578f06a5b98d446e33183cd;p=thirdparty%2Fipxe.git Always update the PnP checksum, even if the ident string is not being set. --- diff --git a/src/util/makerom.pl b/src/util/makerom.pl index 2bd8e1f95..a7d5cc4c8 100755 --- a/src/util/makerom.pl +++ b/src/util/makerom.pl @@ -88,10 +88,12 @@ sub pcipnpheaders ($$) { = pack('v', oct($pci_device_id)) if ($pci_device_id); } } - if ($pnp_hdr_offset > 0 and defined($identoffset)) { - # Point to device id string at end of ROM image - substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2) - = pack('v', $identoffset); + if ($pnp_hdr_offset > 0) { + if (defined($identoffset)) { + # Point to device id string at end of ROM image + substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2) + = pack('v', $identoffset); + } substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = "\x00"; my $sum = unpack('%8C*', substr($$romref, $pnp_hdr_offset, PNP_HDR_SIZE));