|
@@ -88,10 +88,12 @@ sub pcipnpheaders ($$) {
|
88
|
88
|
= pack('v', oct($pci_device_id)) if ($pci_device_id);
|
89
|
89
|
}
|
90
|
90
|
}
|
91
|
|
- if ($pnp_hdr_offset > 0 and defined($identoffset)) {
|
92
|
|
- # Point to device id string at end of ROM image
|
93
|
|
- substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2)
|
94
|
|
- = pack('v', $identoffset);
|
|
91
|
+ if ($pnp_hdr_offset > 0) {
|
|
92
|
+ if (defined($identoffset)) {
|
|
93
|
+ # Point to device id string at end of ROM image
|
|
94
|
+ substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2)
|
|
95
|
+ = pack('v', $identoffset);
|
|
96
|
+ }
|
95
|
97
|
substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = "\x00";
|
96
|
98
|
my $sum = unpack('%8C*', substr($$romref, $pnp_hdr_offset,
|
97
|
99
|
PNP_HDR_SIZE));
|