[Debburn-changes] r665 - cdrkit/trunk/3rd-party/geteltorito

Eduard Bloch blade at alioth.debian.org
Wed Jan 3 13:26:46 CET 2007


Author: blade
Date: 2007-01-03 13:26:46 +0100 (Wed, 03 Jan 2007)
New Revision: 665

Modified:
   cdrkit/trunk/3rd-party/geteltorito/README
   cdrkit/trunk/3rd-party/geteltorito/geteltorito.pl
Log:
Updated geteltorito to 0.4

Modified: cdrkit/trunk/3rd-party/geteltorito/README
===================================================================
--- cdrkit/trunk/3rd-party/geteltorito/README	2007-01-03 12:22:15 UTC (rev 664)
+++ cdrkit/trunk/3rd-party/geteltorito/README	2007-01-03 12:26:46 UTC (rev 665)
@@ -4,7 +4,8 @@
 Author: Rainer Krienke
 Email:  krienke at uni-koblenz.de
 License: GPL
-Version: 0.3
+Version: 0.4
+Description: A El Torito boot image extractor
 
 call: 	geteltorito CD-image > toritoimagefile
 example:geteltorito /dev/sr0  > /tmp/bootimage

Modified: cdrkit/trunk/3rd-party/geteltorito/geteltorito.pl
===================================================================
--- cdrkit/trunk/3rd-party/geteltorito/geteltorito.pl	2007-01-03 12:22:15 UTC (rev 664)
+++ cdrkit/trunk/3rd-party/geteltorito/geteltorito.pl	2007-01-03 12:26:46 UTC (rev 665)
@@ -3,17 +3,23 @@
 use Getopt::Std;
 
 #
+# geteltorito.pl: a bootimage extractor
 # Script that will extract the first El Torito bootimage from a
 # bootable CD image
-# R. Krienke 12/2006
+# R. Krienke 08/2001
 # krienke at uni-koblenz.de
 # License: GPL
 #
 # Get latest version from:
 # http://www.uni-koblenz.de/~krienke/ftp/noarch/geteltorito
 #
-$utilVersion="0.3"; 
+$utilVersion="0.4"; 
 #
+# Version 0.4
+#    2007/02/01
+#    A patch from Santiago Garcia <manty at debian.org> to use a virtual sector
+#    size (vSecSize) of 512 bytes, as defined on "El Torito" specs and change
+#    unpack of the sector count from n to v to get the correct sector count.
 # Version 0.3
 #    2006/02/21
 #    A patch from  Ben Collins <bcollins at ubuntu.com> to make the 
@@ -25,8 +31,11 @@
 #    Initial release
 #
 # For information on El Torito see 
-# http://www.cdpage.com/Compact_Disc_Variations/eltoritoi.html
+# http://wikipedia.org/
+# or try this link directly:
+# http://www.phoenix.com/en/Customer+Services/White+Papers-Specs/Platform+System+Software+Documents/default.htm
 
+$vSecSize=512;
 $secSize=2048;
 $ret=undef;$version=undef;$opt_h=undef;$loadSegment=undef;$systemType=undef;
 
@@ -41,9 +50,9 @@
    open(FILE, $file) || die "Cannot open \"$file\" \n";
 
    seek(FILE, $secNum*$secSize, 0);
-   $count=read(FILE, $sec, $secSize*$secCount, 0) ;
-   if( $count != $secSize*$secCount ){
-   	warn "Error reading $secSize bytes from file \"$file\"\n";
+   $count=read(FILE, $sec, $vSecSize*$secCount, 0) ;
+   if( $count != $vSecSize*$secCount ){
+       warn "Error reading from file \"$file\"\n";
    }
    close(FILE);
 
@@ -136,7 +145,7 @@
 $validateEntry=substr($sector, 0, 32);
 
 ($header, $platform, $unUsed, $manufact, $unUsed, $five, $aa)=
-		unpack( "CCSA24SCC", $validateEntry);
+               unpack( "CCvA24vCC", $validateEntry);
 
 if( $header != 1 || $five != 0x55 || $aa != 0xaa ){
 	die "Invalid Validation Entry on image \n";
@@ -157,7 +166,7 @@
 $initialEntry=substr($sector, 32, 32);
 
 ($boot, $media, $loadSegment, $systemType, $unUsed, 
-	$sCount, $imgStart, $unUsed)=unpack( "CCSCCnVC", $initialEntry);
+       $sCount, $imgStart, $unUsed)=unpack( "CCvCCvVC", $initialEntry);
 
 if( $boot != 0x88 ){
 	die "Boot indicator in Initial/Default-Entry is not 0x88. CD is not bootable. \n";
@@ -170,15 +179,15 @@
 }
 if( $media == 1 ){
 	print STDERR "1.2meg floppy";
-	$count=1200*1024/$secSize;  
+       $count=1200*1024/$vSecSize;  
 }
 if( $media == 2 ){
 	print STDERR "1.44meg floppy";
-	$count=1440*1024/$secSize;  
+       $count=1440*1024/$vSecSize;  
 }
 if( $media == 3 ){
 	print STDERR "2.88meg floppy";
-	$count=2880*1024/$secSize;  
+       $count=2880*1024/$vSecSize;  
 }
 if( $media == 4 ){
 	print STDERR "harddisk";
@@ -190,7 +199,7 @@
 # ($count==0)
 $cnt=$count==0?$sCount:$count;
 
-print STDERR "El Torito image starts at sector $imgStart and has $cnt sector(s) of $secSize Bytes\n";
+print STDERR "El Torito image starts at sector $imgStart and has $cnt sector(s) of $vSecSize Bytes\n";
 
 # We are there:
 # Now read the bootimage to stdout




More information about the Debburn-changes mailing list