From: David Lehman dlehman@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"