From: Gianni Tedesco Date: Fri, 8 Oct 2010 10:41:57 +0000 (+0100) Subject: xl: Fix build in python binding since API change in 22229:1385b15e168f X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11412 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6d01f353157077e92f700bb70b2b9e7c27d1a31c;p=xen.git xl: Fix build in python binding since API change in 22229:1385b15e168f Signed-off-by: Gianni Tedesco Signed-off-by: Stefano Stabellini committer: Stefano Stabellini --- diff --git a/tools/ocaml/libs/xl/xl_stubs.c b/tools/ocaml/libs/xl/xl_stubs.c index 33302b7fd9..3f7420f1bb 100644 --- a/tools/ocaml/libs/xl/xl_stubs.c +++ b/tools/ocaml/libs/xl/xl_stubs.c @@ -638,7 +638,7 @@ value stub_xl_pci_remove(value info, value domid) device_pci_val(&gc, &c_info, info); INIT_CTX(); - ret = libxl_device_pci_remove(&ctx, Int_val(domid), &c_info); + ret = libxl_device_pci_remove(&ctx, Int_val(domid), &c_info, 0); if (ret != 0) failwith_xl("pci_remove", &lg); FREE_CTX(); diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index a0d5a06eb8..6ac2cc42ff 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -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; }