[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 08/16] Remove some unused code from storage.devicelibs.dm.



---
 pyanaconda/storage/devicelibs/dm.py |   60 -----------------------------------
 1 files changed, 0 insertions(+), 60 deletions(-)

diff --git a/pyanaconda/storage/devicelibs/dm.py b/pyanaconda/storage/devicelibs/dm.py
index 9e2f68c..d53803f 100644
--- a/pyanaconda/storage/devicelibs/dm.py
+++ b/pyanaconda/storage/devicelibs/dm.py
@@ -91,64 +91,4 @@ def dm_node_from_name(map_name):
     log.debug("dm_node_from_name(%s) returning '%s'" % (map_name, dm_node))
     return dm_node
 
-def dm_is_multipath(info):
-    major = None
-    minor = None
-
-    if info.has_key('MAJOR'):
-        major = info['MAJOR']
-    elif info.has_key('DM_MAJOR'):
-        major = info['DM_MAJOR']
-    if info.has_key('MINOR'):
-        minor = info['MINOR']
-    elif info.has_key('DM_MINOR'):
-        minor = info['DM_MINOR']
-
-    if major is None or minor is None:
-        return False
-
-    for map in block.dm.maps():
-        dev = map.dev
-        if dev.major == int(major) and dev.minor == int(minor):
-            for table in map.table:
-                if table.type == 'multipath':
-                    return True
-
-def _get_backing_devnums_from_map(map_name):
-    ret = []
-    buf = iutil.execWithCapture("dmsetup",
-                                ["info", "--columns",
-                                 "--noheadings",
-                                 "-o", "devnos_used",
-                                 map_name],
-                                stderr="/dev/tty5")
-    dev_nums = buf.split()
-    for dev_num in dev_nums:
-        (major, colon, minor) = dev_num.partition(":")
-        ret.append((int(major), int(minor)))
-
-    return ret
-
-def get_backing_devnums(dm_node):
-    #dm_node = dm_node_from_name(map_name)
-    if not dm_node:
-        return None
-
-    top_dir = "/sys/block"
-    backing_devs = os.listdir("%s/%s/slaves/" % (top_dir, dm_node))
-    dev_nums = []
-    for backing_dev in backing_devs:
-        dev_num = open("%s/%s/dev" % (top_dir, backing_dev)).read().strip()
-        (_major, _minor) = dev_num.split(":")
-        dev_nums.append((int(_major), int(_minor)))
-
-    return dev_nums
-
-def get_backing_devs_from_name(map_name):
-    dm_node = dm_node_from_name(map_name)
-    if not dm_node:
-        return None
-
-    slave_devs = os.listdir("/sys/block/virtual/%s" % dm_node)
-    return slave_devs
 
-- 
1.7.3.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]