[master 1/4] Correctly get current size of disk files.
dwlehman
installerbot-noreply at redhat.com
Tue Jul 28 21:15:05 UTC 2015
From: David Lehman <dlehman at redhat.com>
---
blivet/devices/disk.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/blivet/devices/disk.py b/blivet/devices/disk.py
index 6221a22..307378b 100644
--- a/blivet/devices/disk.py
+++ b/blivet/devices/disk.py
@@ -161,6 +161,14 @@ def sysfsPath(self, value):
def updateSysfsPath(self):
pass
+ def readCurrentSize(self):
+ size = Size(0)
+ if self.exists and os.path.exists(self.path):
+ st = os.stat(self.path)
+ size = Size(st.st_size)
+
+ return size
+
class DMRaidArrayDevice(DMDevice, ContainerDevice):
""" A dmraid (device-mapper RAID) device """
_type = "dm-raid array"
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/55f8ece5fed5a0475aad4387c94fec30db2e0773
More information about the anaconda-patches
mailing list