diskboot: correct the patching of the floppy table syslinux-4.04-pre7
authorH. Peter Anvin <hpa@zytor.com>
Sun, 6 Feb 2011 22:21:36 +0000 (14:21 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 6 Feb 2011 22:21:36 +0000 (14:21 -0800)
The floppy table patching was somehow messed up when converting to
GPT.  The proper offset of FloppyTable at the point we patch is
[di-12] and we use offset +4 inside that field.

Reported-by: Juergen <jlborries@online.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/diskboot.inc

index 574db45..7c02066 100644 (file)
@@ -162,7 +162,7 @@ floppy:
                mov [bx+2],ax           ; Segment 0
                fs rep movsw            ; Faster to move words
                mov cl,[bsSecPerTrack]  ; Patch the sector count
-               mov [di-76+8],cl
+               mov [di-12+4],cl
 
                push ax                 ; Partition offset == 0
                push ax