Don't display free space at end of extended unless > 1MB. (#626025)
> diff --git a/pyanaconda/iw/partition_gui.py b/pyanaconda/iw/partition_gui.py
> index 4f33e69..de3b45c 100644
> --- a/pyanaconda/iw/partition_gui.py
> +++ b/pyanaconda/iw/partition_gui.py
> @@ -443,12 +443,15 @@ class DiskStripeGraph(StripeGraph):
> sel_col = self.part_type_colors["sel_freespace"]
> xoffset = last_logical_offset
> xlength = last_extended_offset - last_logical_offset
> - slcstr = "%s
%.0f MB" % (_("Free"), Decimal(str(drive.size)) * xlength)
> -
> - slice = Slice(stripe, slcstr, stype, xoffset, xlength,
> - dcCB = self.dcCB, cCB = self.cCB, sel_col=sel_col,
> - unsel_col=unsel_col)
> - stripe.addSlice(slice)
> + # don't add a slice for free regions of <= 1MB
> + size = Decimal(str(drive.size)) * xlength
> + if size > 1:
> + slcstr = "%s
%.0f MB" % (_("Free"), size)
> +
> + slice = Slice(stripe, slcstr, stype, xoffset, xlength,
> + dcCB = self.dcCB, cCB = self.cCB, sel_col=sel_col,
> + unsel_col=unsel_col)
> + stripe.addSlice(slice)
You know, I once did something like this in 8f4ea37b72deb5e6a8bcf12091aa44eb8f6f1056
but apparently that patch has been lost. So ACK, I suppose.
- Chris
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
|