X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=python%2Fguestfs-py.c;h=0022b5b55a5f23fbeecf7cfa27143eeacdd7c43e;hb=012a2ec1acf7a7a2d859f78ea4932ae9fb30522d;hp=59f0b6e48395feac5e92614d95c65996037575dc;hpb=79cdf81e2fb717ea4372a55170d16800cdbddf23;p=libguestfs.git diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 59f0b6e..0022b5b 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -2795,6 +2795,36 @@ py_guestfs_mount_vfs (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_debug (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + char *r; + const char *subcmd; + PyObject *py_extraargs; + const char **extraargs; + + if (!PyArg_ParseTuple (args, (char *) "OsO:guestfs_debug", + &py_g, &subcmd, &py_extraargs)) + return NULL; + g = get_handle (py_g); + extraargs = get_string_list (py_extraargs); + if (!extraargs) return NULL; + + r = guestfs_debug (g, subcmd, extraargs); + free (extraargs); + if (r == NULL) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + py_r = PyString_FromString (r); + free (r); + return py_r; +} + static PyMethodDef methods[] = { { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, @@ -2894,6 +2924,7 @@ static PyMethodDef methods[] = { { (char *) "mount_ro", py_guestfs_mount_ro, METH_VARARGS, NULL }, { (char *) "mount_options", py_guestfs_mount_options, METH_VARARGS, NULL }, { (char *) "mount_vfs", py_guestfs_mount_vfs, METH_VARARGS, NULL }, + { (char *) "debug", py_guestfs_debug, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } };