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:
d05f79f
)
MEMDISK: fix MBR geometry extraction
author
H. Peter Anvin
<hpa@linux.intel.com>
Tue, 14 Apr 2009 19:01:07 +0000
(12:01 -0700)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Tue, 14 Apr 2009 19:01:07 +0000
(12:01 -0700)
Fix the MBR geometry extraction; there was an off-by-2 error in the
MBR signature offset.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memdisk/setup.c
patch
|
blob
|
history
diff --git
a/memdisk/setup.c
b/memdisk/setup.c
index
0fee982
..
6507e56
100644
(file)
--- a/
memdisk/setup.c
+++ b/
memdisk/setup.c
@@
-565,7
+565,7
@@
const struct geometry *get_disk_image_geometry(uint32_t where, uint32_t size)
hd_geometry.driveno = 0x80; /* Assume hard disk */
- if (*(uint16_t *)((char *)where+512) == 0xaa55)
+ if (*(uint16_t *)((char *)where+512
-2
) == 0xaa55)
for ( i = 0 ; i < 4 ; i++ ) {
if ( ptab[i].type && !(ptab[i].active & 0x7f) ) {
s = (ptab[i].start_s & 0x3f);