xl: Fix build in python binding since API change in 22229:1385b15e168f

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
Gianni Tedesco committed 2010-10-08 11:41:57 +01:00
1 parent 77fea72b06
commit 6d01f35315
2 files changed
+5 -4

No files matched your search

+4 -3
View File
@@ -441,15 +441,16 @@ static PyObject *pyxl_pci_del(XlObject *self, PyObject *args)
{
Py_device_pci *pci;
PyObject *obj;
int domid;
if ( !PyArg_ParseTuple(args, "iO", &domid, &obj) )
int domid, force = 0;
if ( !PyArg_ParseTuple(args, "iO|i", &domid, &obj, &force) )
return NULL;
if ( !Pydevice_pci_Check(obj) ) {
PyErr_SetString(PyExc_TypeError, "Xxpected xl.device_pci");
return NULL;
}
pci = (Py_device_pci *)obj;
if ( libxl_device_pci_remove(&self->ctx, domid, &pci->obj) ) {
if ( libxl_device_pci_remove(&self->ctx, domid, &pci->obj, force) ) {
PyErr_SetString(xl_error_obj, "cannot remove pci device");
return NULL;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.