isohybrid: convert -id to a binary string
authorSteffen Winterfeldt <snwint@suse.de>
Mon, 3 Aug 2009 13:21:02 +0000 (15:21 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 3 Aug 2009 21:12:09 +0000 (14:12 -0700)
Shouldn't 'isohybrid -id ID' write ID as 32bit number? Currently it ends up
as string messing up the mbr.

utils/isohybrid.in

index a92b572..0726bed 100644 (file)
@@ -194,7 +194,7 @@ if ($c > 1024) {
 
 # Preserve id when run again
 if (defined($opt{'id'})) {
-    $id = $opt{'id'};
+    $id = pack("V", doh($opt{'id'}));
 } else {
     seek(FILE, 440, SEEK_SET) or die "$0: $file: $!\n";
     read(FILE, $id, 4);