[master 1/1] Fix setting original size for format resize action. (#1225352)
vojtechtrefny
installerbot-noreply at redhat.com
Wed Jun 10 11:30:30 UTC 2015
From: Vojtech Trefny <vtrefny at redhat.com>
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
blivet/deviceaction.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
index e6a0e7c..4fd6df2 100644
--- a/blivet/deviceaction.py
+++ b/blivet/deviceaction.py
@@ -755,7 +755,13 @@ def __init__(self, device, newsize):
self.dir = RESIZE_GROW
else:
self.dir = RESIZE_SHRINK
- self.origSize = self.device.format.targetSize
+
+ if device.format.targetSize > Size(0):
+ self.origSize = device.format.targetSize
+ # no targetSize -- original size for device was its currentSize
+ else:
+ self.origSize = device.format.currentSize
+
self._targetSize = newsize
def apply(self):
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/d5f4ae5b73fb342f06b624fbc36e375df812a5a6
More information about the anaconda-patches
mailing list