summaryrefslogtreecommitdiffstats
path: root/storage/deviceaction.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-10-07 22:43:53 +0200
committerHans de Goede <hdegoede@redhat.com>2009-10-08 08:08:39 +0200
commit064474b20ae76c54d6461c3ceaa6d2dbcdaca1b5 (patch)
treea5957b30c8d7fac27cdd47f085def7de075d696d /storage/deviceaction.py
parente9ee0bcdab4ee8f5665598328bd6301db2797d94 (diff)
downloadanaconda-064474b20ae76c54d6461c3ceaa6d2dbcdaca1b5.tar.gz
anaconda-064474b20ae76c54d6461c3ceaa6d2dbcdaca1b5.tar.xz
anaconda-064474b20ae76c54d6461c3ceaa6d2dbcdaca1b5.zip
Action...Format setup device before modifying the partition table
Diffstat (limited to 'storage/deviceaction.py')
-rw-r--r--storage/deviceaction.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/deviceaction.py b/storage/deviceaction.py
index 7e73dfbcf..c6952f300 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()