com32/chain: utility's lba2chs update
commit81f86009696b5c7eff76e1981e967367235c5f7c
authorMichal Soltys <soltys@ziu.info>
Tue, 28 Sep 2010 17:57:28 +0000 (28 19:57 +0200)
committerMichal Soltys <soltys@ziu.info>
Fri, 8 Oct 2010 10:40:51 +0000 (8 12:40 +0200)
tree9f7d86b09f75877da049c9fab6321b8547255cd0
parent71485af3c0b47409fbd721d83f20fb8fcac76e42
com32/chain: utility's lba2chs update

This patch adds 3 modes of operation to lba2chs:

l2c_cnul - strict cylinder mode, using at most the value returned by
13h/48h or 13h/08h

l2c_cadd - allow using 1 cylinder more. Only if cylinders are less than
1024 and total drive's lba size is not on a cylinder boundary.

l2c_max - allow using any cylinder number.

Modes have effect only if CHS geometry (cbios) is valid. chain.c uses
l2c_cadd.

Signed-off-by: Michal Soltys <soltys@ziu.info>
com32/chain/Makefile
com32/chain/chain.c
com32/chain/mangle.c
com32/chain/utility.c
com32/chain/utility.h