Home | History | Annotate | Download | only in util

Lines Matching full:substr

33 		if (substr($$romref, 0, 2) ne "\x55\xaa");
34 my $size = ord(substr($$romref, 2, 1)) * 512;
50 return (0) if (substr($$romref, $pos, $len) ne ("\xFF" x $len));
51 substr($$romref, $pos, $len) = $s;
59 $pci_hdr_offset = unpack('v', substr($$romref, PCI_PTR_LOC, 2));
60 $pnp_hdr_offset = unpack('v', substr($$romref, PNP_PTR_LOC, 2));
66 or substr($$romref, $pci_hdr_offset, 4) ne 'PCIR'
67 or substr($$romref, $pnp_hdr_offset, 4) ne '$PnP') {
77 $pci_vendor_id = unpack('v', substr($$romref, $pci_hdr_offset+PCI_VEND_ID_OFF, 2));
78 $pci_device_id = unpack('v', substr($$romref, $pci_hdr_offset+PCI_DEV_ID_OFF, 2));
82 substr($$romref, $pci_hdr_offset + PCI_SIZE_OFF, 2)
85 substr($$romref, $pci_hdr_offset+PCI_VEND_ID_OFF, 2)
87 substr($$romref, $pci_hdr_offset+PCI_DEV_ID_OFF, 2)
94 substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2)
97 substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = "\x00";
98 my $sum = unpack('%8C*', substr($$romref, $pnp_hdr_offset,
100 substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = chr(256 - $sum);
108 $undi_hdr_offset = unpack('v', substr($$romref, UNDI_PTR_LOC, 2));
112 or substr($$romref, $undi_hdr_offset, 4) ne 'UNDI') {
118 substr($$romref, $undi_hdr_offset+UNDI_CHKSUM_OFF, 1) = "\x00";
119 my $sum = unpack('%8C*', substr($$romref, $undi_hdr_offset,
121 substr($$romref, $undi_hdr_offset+UNDI_CHKSUM_OFF, 1) = chr(256 - $sum);
136 substr($$romref, 6, 1) = "\x00";
137 my $sum = unpack('%8C*', substr($$romref, 0, $romsize));
138 substr($$romref, 6, 1) = chr(256 - $sum);
140 $sum = unpack('%8C*', substr($$romref, 0, $romsize));
161 substr($rom, 2, 1) = chr((length($rom) + 511) / 512);
191 substr($rom, 2, 1) = chr(($romsize / 512) % 256);
193 $stubsize = ord(substr($rom, 2, 1)) * 512;
198 my $pnp_hdr_offset = unpack('v', substr($rom, PNP_PTR_LOC, 2));
199 my $identoffset = substr($rom, $pnp_hdr_offset+PNP_DEVICE_OFF, 2) eq "\0\0" ? addident(\$rom) : undef;
203 substr($rom, MINROMSIZE-2, 2) = "\x80\x80"
222 checksum(\$rom, ord(substr($rom, 2, 1)) * 512);