Re: [PATCH 1/2] Action...Format setup device before modifying the partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-10-07 at 22:51 +0200, Hans de Goede wrote:
> ---
>  storage/deviceaction.py |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

Ack.

> 
> diff --git a/storage/deviceaction.py b/storage/deviceaction.py
> index 7e73dfb..c6952f3 100644
> --- a/storage/deviceaction.py
> +++ b/storage/deviceaction.py
> @@ -260,12 +260,13 @@ class ActionCreateFormat(DeviceAction):
>              self.origFormat = getFormat(None)
>  
>      def execute(self, intf=None):
> +        self.device.setup()
> +
>          if isinstance(self.device, PartitionDevice):
>              if self.format.partedFlag is not None:
>                  self.device.setFlag(self.format.partedFlag)
>                  self.device.disk.format.commitToDisk()
>  
> -        self.device.setup()
>          self.device.format.create(intf=intf,
>                                    device=self.device.path,
>                                    options=self.device.formatArgs)
> @@ -297,13 +298,14 @@ class ActionDestroyFormat(DeviceAction):
>      def execute(self, intf=None):
>          """ wipe the filesystem signature from the device """
>          if self.origFormat:
> +            self.device.setup()
> +
>              if isinstance(self.device, PartitionDevice) and \
>                 self.origFormat.partedFlag is not None:
>                  # unset partition flags and commit
>                  self.device.unsetFlag(self.origFormat.partedFlag)
>                  self.device.disk.format.commitToDisk()
>  
> -            self.device.setup()
>              self.origFormat.destroy()
>              udev_settle()
>              self.device.teardown()

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux