From: Stratos Psomadakis Date: Wed, 16 May 2012 23:03:01 +0000 (+0300) Subject: tools: Fix some errors after the name to target renames X-Git-Tag: debian/0.3.1~247 X-Git-Url: https://code.grnet.gr/git/archipelago/commitdiff_plain/ac64ddb134b91a4227b31e98d3ce8f10afeb4c92 tools: Fix some errors after the name to target renames (Need a lot more fixes to bring the up-to-date with the new code) --- diff --git a/xseg/tools/vlmc-blockd.py b/xseg/tools/vlmc-blockd.py index d0a3902..0d4a415 100755 --- a/xseg/tools/vlmc-blockd.py +++ b/xseg/tools/vlmc-blockd.py @@ -47,7 +47,7 @@ def vlmc_unmap(args): try: for f in os.listdir(XSEGBD_SYSFS + "devices/"): d_id = open(XSEGBD_SYSFS + "devices/" + f + "/id").read().strip() - name = open(XSEGBD_SYSFS + "devices/"+ f + "/name").read().strip() + name = open(XSEGBD_SYSFS + "devices/"+ f + "/target").read().strip() if device == DEVICE_PREFIX + d_id: fd = os.open(XSEGBD_SYSFS + "remove", os.O_WRONLY) os.write(fd, d_id) @@ -66,7 +66,7 @@ def vlmc_showmapped(args): try: for f in os.listdir(XSEGBD_SYSFS + "devices/"): d_id = open(XSEGBD_SYSFS + "devices/" + f + "/id").read().strip() - name = open(XSEGBD_SYSFS + "devices/"+ f + "/name").read().strip() + name = open(XSEGBD_SYSFS + "devices/"+ f + "/target").read().strip() print "%s\t%s\t%s\t%s\t%s" % (d_id, '-', name, '-', DEVICE_PREFIX + d_id) diff --git a/xseg/tools/vlmc-filed.py b/xseg/tools/vlmc-filed.py index 45feffa..365331a 100755 --- a/xseg/tools/vlmc-filed.py +++ b/xseg/tools/vlmc-filed.py @@ -33,7 +33,7 @@ def vlmc_unmap(args): try: for f in os.listdir(XSEGBD_SYSFS + "devices/"): d_id = open(XSEGBD_SYSFS + "devices/" + f + "/id").read().strip() - name = open(XSEGBD_SYSFS + "devices/"+ f + "/name").read().strip() + name = open(XSEGBD_SYSFS + "devices/"+ f + "/target").read().strip() if device == DEVICE_PREFIX + d_id: fd = os.open(XSEGBD_SYSFS + "remove", os.O_WRONLY) os.write(fd, d_id) @@ -52,9 +52,9 @@ def vlmc_showmapped(args): try: for f in os.listdir(XSEGBD_SYSFS + "devices/"): d_id = open(XSEGBD_SYSFS + "devices/" + f + "/id").read().strip() - name = open(XSEGBD_SYSFS + "devices/"+ f + "/name").read().strip() + target = open(XSEGBD_SYSFS + "devices/"+ f + "/target").read().strip() - print "%s\t%s\t%s\t%s\t%s" % (d_id, '-', name, '-', DEVICE_PREFIX + + print "%s\t%s\t%s\t%s\t%s" % (d_id, '-', target, '-', DEVICE_PREFIX + d_id) except Exception, reason: print >> sys.stderr, reason