Switch to our osminor
authorKlaus Aehlig <aehlig@google.com>
Tue, 7 Apr 2015 16:06:13 +0000 (18:06 +0200)
committerKlaus Aehlig <aehlig@google.com>
Tue, 7 Apr 2015 16:22:11 +0000 (18:22 +0200)
...and thus work around the bug in os.minor

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

lib/storage/bdev.py

index e71635c..6ba033d 100644 (file)
@@ -961,7 +961,7 @@ class PersistentBlockDevice(base.BlockDev):
       return False
 
     self.major = os.major(st.st_rdev)
-    self.minor = os.minor(st.st_rdev)
+    self.minor = utils.osminor(st.st_rdev)
     self.attached = True
 
     return True
@@ -1097,7 +1097,7 @@ class RADOSBlockDevice(base.BlockDev):
       return False
 
     self.major = os.major(st.st_rdev)
-    self.minor = os.minor(st.st_rdev)
+    self.minor = utils.osminor(st.st_rdev)
     self.attached = True
 
     return True
@@ -1458,7 +1458,7 @@ class ExtStorageDevice(base.BlockDev):
       return False
 
     self.major = os.major(st.st_rdev)
-    self.minor = os.minor(st.st_rdev)
+    self.minor = utils.osminor(st.st_rdev)
     self.attached = True
 
     return True