[kpartx] fix partition calculations of DASD partitions
authorroot <root@zezette.localdomain>
Mon, 11 Dec 2006 21:07:56 +0000 (22:07 +0100)
committerroot <root@zezette.localdomain>
Mon, 11 Dec 2006 21:07:56 +0000 (22:07 +0100)
commit45769f44a57a1df2ec3f160e3a8b0ec5d6832a20
tree7e9ee9f943c4707bb585551a865d14d9d761e31a
parentfe97a0380b9d900a4ba055d254c989280d9a31ba
[kpartx] fix partition calculations of DASD partitions

This patch fixes the offset and length calcuations for DASD partitions
with either CMS (without explicit offset), the old linux disk layout or
no partition information at all if the devices are using a blocksize
bigger than 512B.
In the cases mentioned above the offset was normalized (to the number of
512B sectors) twice and the size reduced by the normalized offset and
again by the double normalized offset later.
This leads to kpartx defining the wrong limits in these cases.

Signed-off-by: Stefan Bader <shbader@de.ibm.com>
kpartx/dasd.c