static void cleanup(void) { if((pidfile != NULL) && unlink(pidfile_path) < 0) { printlog(LOG_WARNING,"Couldn't remove pidfile '%s': %s", pidfile, strerror(errno)); } if (vdestream != NULL) vdestream_close(vdestream); if (conn != NULL) vde_close(conn); }
static void vde_remove(void *data) { struct vde_data *pri = data; if (pri->conn != NULL) { printk(UM_KERN_INFO "vde backend - closing connection\n"); vde_close(pri->conn); pri->conn = NULL; kfree(pri->args); pri->args = NULL; return; } printk(UM_KERN_WARNING "vde_remove - we have no VDECONN to remove"); }
static PyObject *vdeplug_close(PyObject *self, PyObject *args) { VDECONN *conn; unsigned long vde_magic = 0; if (!PyArg_ParseTuple(args, "k", &vde_magic)) goto failure; conn = (VDECONN *) vde_magic; if (!conn) goto failure; return Py_BuildValue("i", vde_close(conn)); failure: return PyErr_SetFromErrno(PyExc_RuntimeError); }
void pico_vde_destroy(struct pico_device *dev) { struct pico_device_vde *vde = (struct pico_device_vde *) dev; vde_close(vde->conn); }
static void cleanup(void) { vdestream_close(vdestream); vde_close(conn); }
static void vde_cleanup(NetClientState *nc) { VDEState *s = DO_UPCAST(VDEState, nc, nc); qemu_set_fd_handler(vde_datafd(s->vde), NULL, NULL, NULL); vde_close(s->vde); }