dom0+vm/usb: bugfix in usb_find_unused_frontend()

This commit is contained in:
Alexandre Bezroutchko 2012-11-07 00:24:05 +01:00
parent 7366ca00e7
commit aeac4d20dc

View File

@ -578,9 +578,7 @@ def usb_find_unused_frontend(xs_trans, backend_vm_xid, vm_xid, usb_ver):
if xs.read(xs_trans, '/local/domain/%d/backend/vusb/%d/%d/usb-ver' % (backend_vm_xid, vm_xid, frontend_dev)) != usb_ver:
last_frontend_dev = frontend_dev
continue
if xs.read(xs_trans, "%s/backend-id" % fe_path) == str(backend_vm_xid):
last_frontend_dev = frontend_dev
continue
# here: found an existing frontend already connected to right backend using an appropriate USB version
ports = xs.ls(xs_trans, '/local/domain/%d/backend/vusb/%d/%d/port' % (backend_vm_xid, vm_xid, frontend_dev))
if ports is None:
last_frontend_dev = frontend_dev