diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-04-23 14:39:31 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-04-23 14:39:31 +0100 |
commit | 8f9f02d483b87c787d089cf9329f5f1b81d3a77e (patch) | |
tree | ee1c0403092e9dd296c43706a0c7c2d14d5a5c19 /python/guestfs-py.c | |
parent | 713283f4a67b3a1960ca96ce6608d046fc202d2d (diff) | |
download | libguestfs-8f9f02d483b87c787d089cf9329f5f1b81d3a77e.tar.gz libguestfs-8f9f02d483b87c787d089cf9329f5f1b81d3a77e.tar.xz libguestfs-8f9f02d483b87c787d089cf9329f5f1b81d3a77e.zip |
Generated code for debug command.
Diffstat (limited to 'python/guestfs-py.c')
-rw-r--r-- | python/guestfs-py.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 59f0b6e4..0022b5b5 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 } }; |