Set up devices using their original formats for certain action types.
Ack.
On 03/10/2010 01:18 AM, David Lehman wrote:
Any action that acts on a pre-existing device should set up that
device using the original formats because value of the devices'
format attribute may have changed to represent a format that does
not yet exist.
---
storage/deviceaction.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/storage/deviceaction.py b/storage/deviceaction.py
index dbfaf60..859c0f1 100644
--- a/storage/deviceaction.py
+++ b/storage/deviceaction.py
@@ -309,7 +309,7 @@ class ActionDestroyFormat(DeviceAction):
def execute(self, intf=None):
""" wipe the filesystem signature from the device """
if self.origFormat:
- self.device.setup()
+ self.device.setup(orig=True)
self.origFormat.destroy()
udev_settle()
self.device.teardown()
@@ -344,7 +344,7 @@ class ActionResizeFormat(DeviceAction):
self.device.format.targetSize = newsize