com32/chain: manglepe_fixchs() correction
We have to be more careful, when in-entry start/length values are 0 (one
or both). Firstly they are relative to the disk or the [B]EBR (while CHS
are absolute). Secondly, length 0 would imply the end CHS being lower
than the start CHS.
Under normal circumstances, partiter would complain about corrupt layout
(unless relax flag is set) and value 0 in any of those fields generally
imply a hole, so the adjustments were harmless - nontheless they made
everything look silly and not really correct.
Adjusted approach is:
- for start entry - if the os entry is 0 /and/ the beginning is 0 -
reset to 0, otherwise calculate chs
- for end entry - as above /or/ length is 0 - reset to 0, otherwise
calculate chs
Signed-off-by: Michal Soltys <soltys@ziu.info>