From: Stephen Powell <zlinux...@wowway.com> Fix a bug in which the starting block of the partition is incorrectly calculated for LDL disks if the block size is not 4906.
In the old Linux Disk Layout, there is a single implicit partition on the disk. The first two physical blocks on the disk (for a CKD DASD device) are IPL records. The third physical block is the volume label. The implicit partition begins with the fourth physical block and extends to the end of the disk. This is an s390-specific fix. Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> --- NEWS | 4 ++++ libparted/labels/dasd.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index c5c2182..4735990 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,10 @@ GNU parted NEWS -*- outline -*- libparted uses a more accurate heuristic to distinguish between ext4 and ext3 partitions. + dasd: The starting block for disks with the old Linux Disk Layout has + been corrected to take the block size into account. This allows + DASDs with block sizes other than 4096 to be used. + ** Changes in behavior libparted no longer issues an exception/warning about >512-byte diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c index 275a55a..1b29fcf 100644 --- a/libparted/labels/dasd.c +++ b/libparted/labels/dasd.c @@ -292,7 +292,8 @@ dasd_read (PedDisk* disk) /* LDL format, old one */ disk_specific->format_type = 1; - start = 24; + start = (long long) arch_specific->real_sector_size + / (long long)disk->dev->sector_size * 3; end = (long long)(long long) anchor.geo.cylinders * (long long)anchor.geo.heads * (long long)disk->dev->hw_geom.sectors -- 1.7.1.rc1 _______________________________________________ bug-parted mailing list bug-parted@gnu.org http://lists.gnu.org/mailman/listinfo/bug-parted