disklib: updates - lbacnt, bps, misc. things
commita2046031ec132d3bbf12ad0472d39eb26a041540
authorMichal Soltys <soltys@ziu.info>
Tue, 28 Sep 2010 15:33:25 +0000 (28 17:33 +0200)
committerMichal Soltys <soltys@ziu.info>
Fri, 8 Oct 2010 10:33:20 +0000 (8 12:33 +0200)
treec6d034295056180a01f5e866f15c5f10a82f0936
parent578bd203ba04816de56577c7589a69143178fc60
disklib: updates - lbacnt, bps, misc. things

With this commit, disk_info structure provides additional fields,
namely:

lbacnt - total amount of sectors, either returned by 13h/48h or calculated
from valid (or faked - 1/1/1) geometry

bps - bytes per sector - returned by 13h/48h or equal to SECTOR

disk_get_params() has been adjusted to call int13h/48h to get extended
drive parameters - mentioned lbacnt and bps. We don't use geometry
data returned by 13h/48h, as it can be quite a bit different from
the data returned by 13h/08h.

disk_write_verify_sector() and disk_write_sector() can deal with more
than 1 sector now. Suffix has been renamed to _sectors().

disk_read_sectors() and disk_write_sectors() have been updated to check
if we don't overflow bounce buffer, and don't try to read beyond lbacnt.

All disk.c functions use 'bps' now, instead of hardcoded SECTOR.

struct disk_ebios_dapa - uses packed attribute now.

Signed-off-by: Michal Soltys <soltys@ziu.info>
com32/include/syslinux/disk.h
com32/lib/syslinux/disk.c
com32/modules/chain.c