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)
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)
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)
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