* libparted/arch/linux.c (linux_get_xxx_alignment): blkid's topology io size may be 0 when blkid could not get the minimum / optimum iosize. Return NULL in this case instead of returning a bogus (grain_size == 0) alignment. --- libparted/arch/linux.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c index 7908c46..9566db8 100644 --- a/libparted/arch/linux.c +++ b/libparted/arch/linux.c @@ -2529,7 +2529,7 @@ linux_get_minimum_alignment(const PedDevice *dev) { blkid_topology tp = LINUX_SPECIFIC(dev)->topology; - if (!tp) + if (!tp || blkid_topology_get_minimum_io_size(tp) == 0) return NULL; /* ped_alignment_none */ return ped_alignment_new( @@ -2542,7 +2542,7 @@ linux_get_optimum_alignment(const PedDevice *dev) { blkid_topology tp = LINUX_SPECIFIC(dev)->topology; - if (!tp) + if (!tp || blkid_topology_get_optimal_io_size(tp) == 0) return NULL; /* ped_alignment_none */ return ped_alignment_new( -- 1.6.5.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list