mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
This fixes the check for a request to detatch a non-existent device in pci_device_configure. The previous check was bogus because the format of AUTO_PHP_SLOT_STR is not the same as that of x['vslot']. However, it works in a slightly non-obvious way, checking that vslot hasn't been altered from its initial value AUTO_PHP_SLOT_STR. To make this shceme a little clearer, use an empty string as the inital value. Formting issues asside, neither AUTO_PHP_SLOT_STR nor the empty string are valid values for x['vslot']. In the event of invalid data (indicating a bug), it should be caught by self.hvm_destroyPCIDevice. Signed-off-by: Simon Horman <horms@verge.net.au>
The file test.py here is from the Zope project, and is Copyright (c) 2001, 2002 Zope Corporation and Contributors. This file is released under the Zope Public License, version 2.0, a copy of which is in the file ZPL-2.0.