File libparted-dasd-do-not-use-first-tracks.patch of Package parted.3440

---
 libparted/labels/dasd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: parted-3.1/libparted/labels/dasd.c
===================================================================
--- parted-3.1.orig/libparted/labels/dasd.c
+++ parted-3.1/libparted/labels/dasd.c
@@ -803,7 +803,8 @@ _primary_constraint (PedDisk* disk)
 	if (!ped_alignment_init (&end_align, -1,
 						     disk->dev->hw_geom.sectors * sector_size))
 		return NULL;
-	if (!ped_geometry_init (&max_geom, disk->dev, 0, disk->dev->length))
+	if (!ped_geometry_init (&max_geom, disk->dev, 2 * disk->dev->hw_geom.sectors * sector_size,
+				disk->dev->length - 2 * disk->dev->hw_geom.sectors * sector_size))
 		return NULL;
 
 	return ped_constraint_new(&start_align, &end_align, &max_geom,
openSUSE Build Service is sponsored by