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();
{
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;
}