[util] Allow Option::ROM to access multiple ROM images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2012-06-12 11:36:20 +01:00
parent cdee7866f5
commit f2e5f8813e
3 changed files with 129 additions and 53 deletions
+6 -2
View File
@@ -28,7 +28,11 @@ my @romfiles = @ARGV;
foreach my $romfile ( @romfiles ) {
my $rom = new Option::ROM;
$rom->load ( $romfile );
$rom->pnp_header->fix_checksum() if $rom->pnp_header;
$rom->fix_checksum();
my $image = $rom;
while ( $image ) {
$image->pnp_header->fix_checksum() if $image->pnp_header;
$image->fix_checksum();
$image = $image->next_image();
}
$rom->save ( $romfile );
}