xl: Fix build in python binding since API change in 22229:1385b15e168f
authorGianni Tedesco <gianni.tedesco@citrix.com>
Fri, 8 Oct 2010 10:41:57 +0000 (11:41 +0100)
committerGianni Tedesco <gianni.tedesco@citrix.com>
Fri, 8 Oct 2010 10:41:57 +0000 (11:41 +0100)
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>

tools/ocaml/libs/xl/xl_stubs.c
tools/python/xen/lowlevel/xl/xl.c

index 33302b7fd97571eef4270d1da29c2f71ad0f158c..3f7420f1bb1fcb759fb4b3d45e485f2183cfae43 100644 (file)
@@ -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();
index a0d5a06eb8c089f1d7d31c8bc90c3cfefff1ec50..6ac2cc42ffa0aa76b723051e0fbd2a12374c8b7a 100644 (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;
     }