[PATCH 1/5] Don't prevent grow actions on devices with no max size.
Anne Mulhern
amulhern at redhat.com
Thu Mar 20 20:36:14 UTC 2014
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Thursday, March 20, 2014 1:06:36 PM
> Subject: [PATCH 1/5] Don't prevent grow actions on devices with no max size.
>
> ---
> blivet/deviceaction.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
> index cfb8022..d9a6a87 100644
> --- a/blivet/deviceaction.py
> +++ b/blivet/deviceaction.py
> @@ -381,7 +381,7 @@ class ActionResizeDevice(DeviceAction):
> if newsize < device.minSize:
> raise ValueError("new size is too small")
>
> - if newsize > device.maxSize:
> + if device.maxSize and newsize > device.maxSize:
> raise ValueError("new size is too large")
>
> DeviceAction.__init__(self, device)
> --
> 1.8.5.3
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
This should work with the current situation where 0 is a special value that means "mo max size".
What does "no max size" mean?
Would it be useful to have a special Size value to represent that concept, rather than Size(0), which also represents 0?
- mulhern
More information about the anaconda-patches
mailing list