[rhinstaller/blivet/pulls/68 master] Use /sys to obtain sizes of existing devices

dwlehman installerbot-noreply at redhat.com
Tue Apr 7 15:10:33 UTC 2015


Added the following to the first patch:
```patch
commit e193a85e4b28899952c22440381f16819ea346ad
Author: David Lehman <dlehman at redhat.com>
Date:   Tue Apr 7 09:29:23 2015 -0500
 
    Update size info as needed after setting up any device.
 
diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
index 0897065..052b397 100644
--- a/blivet/devices/storage.py
+++ b/blivet/devices/storage.py
@@ -379,9 +379,10 @@ class StorageDevice(Device):
     def _postSetup(self):
         """ Perform post-setup operations. """
         udev.settle()
-        # we always probe since the device may not be set up when we want
-        # information about it
-        self._size = self.currentSize
+        self.updateSysfsPath()
+        # the device may not be set up when we want information about it
+        if self._size == Size(0):
+            self.updateSize()
 
     #
     # teardown
```
-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/68


More information about the anaconda-patches mailing list