diff options
author | Michael Brown <mcb30@etherboot.org> | 2006-08-24 17:56:46 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2006-08-24 17:56:46 +0000 |
commit | 028bc034e44d45350578f06a5b98d446e33183cd (patch) | |
tree | 1a90fdb30dcaa8b5cd5001fab8717519be1550e3 /src/util | |
parent | b4e559d7e29dc7a528f1911f57a3c6264dd24818 (diff) | |
download | ipxe-028bc034e44d45350578f06a5b98d446e33183cd.tar.gz |
Always update the PnP checksum, even if the ident string is not being set.
Diffstat (limited to 'src/util')
-rwxr-xr-x | src/util/makerom.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util/makerom.pl b/src/util/makerom.pl index 2bd8e1f9..a7d5cc4c 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)); |