[master][blivet][PATCH] Consider existing None format nonresizable (#1033778)

David Lehman dlehman at redhat.com
Tue Nov 26 16:43:09 UTC 2013


On Tue, 2013-11-26 at 14:57 +0100, Vratislav Podzimek wrote:
> If there is an existing format, but we cannot recognize it we shouldn't consider
> it resizable.

This is going to need a slightly more complicated fix. If a device is
truly unformatted we should be able to resize it. See blivet commit
e411bd44f47d85, which I now believe I did wrong. I think I should have
set the name attribute -- not the type attr -- to the udev-provided
fstype so all the places where we check for a type of None would still
work and the UI stuff, which should use name instead of type, would all
show something other than "Unknown".

David

> 
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>  blivet/devices.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/blivet/devices.py b/blivet/devices.py
> index d8ca488..c0cc809 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -656,8 +656,7 @@ class StorageDevice(Device):
>      def resizable(self):
>          """ Can this type of device be resized? """
>          return (self._resizable and self.exists and
> -                (self.format.type is None or self.format.resizable or
> -                 not self.format.exists))
> +                (not self.format.exists or self.format.resizable))
>  
>      def notifyKernel(self):
>          """ Send a 'change' uevent to the kernel for this device. """




More information about the anaconda-patches mailing list