aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-11-19 20:17:43 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-11-19 20:17:43 -0800
commita0dae108231cdd929aff1f6551fcb70c806c0f99 (patch)
tree0cc496aff2f7b7580515363cb6ebd2d029b75d93 /memdisk
parentdee8f891599f2497e194e086f6603b00291ce033 (diff)
downloadsyslinux.git-a0dae108231cdd929aff1f6551fcb70c806c0f99.tar.gz
syslinux.git-a0dae108231cdd929aff1f6551fcb70c806c0f99.tar.xz
syslinux.git-a0dae108231cdd929aff1f6551fcb70c806c0f99.zip
memdisk: pptr->cd_pkt.sect_count is in virtual sectors
Per the El Torito spec, pptr->cd_pkt.sect_count are in virtual sectors, i.e. 512-byte sectors. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 5a45f392..db986faa 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -1032,7 +1032,7 @@ void setup(const struct real_mode_args *rm_args_ptr)
pptr->cd_pkt.start = boot_cat->initial_entry.load_block;
boot_seg = pptr->cd_pkt.load_seg = boot_cat->initial_entry.load_seg;
pptr->cd_pkt.sect_count = boot_cat->initial_entry.sect_count;
- boot_len = pptr->cd_pkt.sect_count * 2048;
+ boot_len = pptr->cd_pkt.sect_count * 512;
pptr->cd_pkt.geom1 = (uint8_t)(pptr->cylinders) & 0xFF;
pptr->cd_pkt.geom2 =
(uint8_t)(pptr->sectors) | (uint8_t)((pptr->cylinders >> 2) & 0xC0);