On Wednesday, April 01 2009, Hans de Goede said:
diff --git a/storage/devices.py b/storage/devices.py
index 32e4c23..4189eb4 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -131,6 +131,14 @@ def get_device_majors():
device_majors = get_device_majors()
+def devicePathToDeviceName(path):
+ name = path[5:]
+ if name.startswith("mapper/")
+ name = name[7:]
+
+ return name
Would it make sense to have this as a method of the device rather than a
stand-alone function? It looks like everywhere you're using it has a
device/partition