summaryrefslogtreecommitdiffstats
path: root/pyanaconda/storage/devicelibs/dm.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2010-11-16 13:27:43 -0500
committerDavid Lehman <dlehman@redhat.com>2010-12-02 12:29:55 -0600
commit73c1ae8770fb67282ae6faa955fe0561906a7ce8 (patch)
tree29cf5a377b8f20cfdd6fb8dda9329161ace48551 /pyanaconda/storage/devicelibs/dm.py
parentcb387c67eb351f97664b7f0b3150c1619fe41425 (diff)
downloadanaconda-73c1ae8770fb67282ae6faa955fe0561906a7ce8.tar.gz
anaconda-73c1ae8770fb67282ae6faa955fe0561906a7ce8.tar.xz
anaconda-73c1ae8770fb67282ae6faa955fe0561906a7ce8.zip
Remove some unused code from storage.devicelibs.dm.
Diffstat (limited to 'pyanaconda/storage/devicelibs/dm.py')
-rw-r--r--pyanaconda/storage/devicelibs/dm.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/pyanaconda/storage/devicelibs/dm.py b/pyanaconda/storage/devicelibs/dm.py
index 9e2f68c59..d53803feb 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