FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 11-30-2010, 07:09 PM
David Lehman
 
Default 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org