dom0+vm/usb: cosmetic - added comments to usb_find_unused_frontend()

This commit is contained in:
Alexandre Bezroutchko 2012-11-07 00:41:13 +01:00
parent 900e5327d2
commit 14a1f9f67f

View File

@ -565,7 +565,10 @@ def usb_find_unused_frontend(xs_trans, backend_vm_xid, vm_xid, usb_ver):
Returns frontend specification in <device>-<port> format.
"""
# This variable holds an index of last frontend scanned by the loop below.
# If nothing found, this value will be used to derive the index of a new frontend.
last_frontend_dev = -1
frontend_devs = xs.ls(xs_trans, "/local/domain/%d/device/vusb" % vm_xid)
if frontend_devs is not None:
for frontend_dev in frontend_devs: