ia64/xen-unstable

changeset 11563:7c5d1c379438

[XEND] Don't prepend '/dev/' to any absolute path.
Check for '/' rather than '/dev/' when translating e.g. 'hda'->'/dev/hda'
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
author Tim Deegan <tim.deegan@xensource.com>
date Thu Sep 21 15:00:50 2006 +0100 (2006-09-21)
parents 7894224d264b
children 5bc0e9a50687
files tools/python/xen/util/blkif.py
line diff
     1.1 --- a/tools/python/xen/util/blkif.py	Thu Sep 21 14:58:01 2006 +0100
     1.2 +++ b/tools/python/xen/util/blkif.py	Thu Sep 21 15:00:50 2006 +0100
     1.3 @@ -7,7 +7,7 @@ from xen.xend.XendLogging import log
     1.4  def expand_dev_name(name):
     1.5      if not name:
     1.6          return name
     1.7 -    if re.match( '^/dev/', name ):
     1.8 +    if re.match( '^/', name ):
     1.9          return name
    1.10      else:
    1.11          return '/dev/' + name
    1.12 @@ -65,7 +65,7 @@ def blkdev_uname_to_file(uname):
    1.13      fn = None
    1.14      if uname.find(":") != -1:
    1.15          (typ, fn) = uname.split(":")
    1.16 -        if typ == "phy" and not fn.startswith("/dev/"):
    1.17 +        if typ == "phy" and not fn.startswith("/"):
    1.18              fn = "/dev/%s" %(fn,)
    1.19      return fn
    1.20