mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
77fea72b06
commit
6d01f35315
2 files changed
+5
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||