projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a6dda6
)
isohybrid: make the -offset option actually work
author
H. Peter Anvin
<hpa@zytor.com>
Tue, 17 Nov 2009 02:21:37 +0000
(18:21 -0800)
committer
H. Peter Anvin
<hpa@zytor.com>
Tue, 17 Nov 2009 02:21:37 +0000
(18:21 -0800)
Actually implement the -offset option. Credit for the patch goes to
"cmdr from the gparted-forum", reported by
Sven-Hendrik Haase <sh@lutzhaase.com>.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
utils/isohybrid.in
patch
|
blob
|
history
diff --git
a/utils/isohybrid.in
b/utils/isohybrid.in
index
0726bed
..
a127784
100644
(file)
--- a/
utils/isohybrid.in
+++ b/
utils/isohybrid.in
@@
-221,7
+221,7
@@
$mbr .= "\0\0"; # Offset 446: actual partition table
# Print partition table
$offset = $opt{'offset'};
-$psize = $c*$h*$s;
+$psize = $c*$h*$s
- $offset
;
$bhead = int($offset/$s) % $h;
$bsect = ($offset % $s) + 1;
$bcyl = int($offset/($h*$s));
@@
-236,7
+236,7
@@
$pentry = $opt{'entry'}; # Partition slot
for ( $i = 1 ; $i <= 4 ; $i++ ) {
if ( $i == $pentry ) {
$mbr .= pack("CCCCCCCCVV", 0x80, $bhead, $bsect, $bcyl, $fstype,
- $ehead, $esect, $ecyl,
0
, $psize);
+ $ehead, $esect, $ecyl,
$offset
, $psize);
} else {
$mbr .= "\0" x 16;
}