diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 12:47:20 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 12:47:20 +0100 |
commit | e492608f2f3809a824cb70ee03ff305964b69dd7 (patch) | |
tree | 953ec56c34431549dab177eec9e0fe979606e5eb /python/guestfs-py.c | |
parent | 9a92446bcad09b492dee42dd5950bac67073fbea (diff) | |
download | libguestfs-e492608f2f3809a824cb70ee03ff305964b69dd7.tar.gz libguestfs-e492608f2f3809a824cb70ee03ff305964b69dd7.tar.xz libguestfs-e492608f2f3809a824cb70ee03ff305964b69dd7.zip |
Generated code for 'du' command.
Diffstat (limited to 'python/guestfs-py.c')
-rw-r--r-- | python/guestfs-py.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 59a891ff..ac1283be 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -4853,6 +4853,30 @@ py_guestfs_df_h (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_du (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int64_t r; + const char *path; + + if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_du", + &py_g, &path)) + return NULL; + g = get_handle (py_g); + + r = guestfs_du (g, path); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + py_r = PyLong_FromLongLong (r); + return py_r; +} + static PyMethodDef methods[] = { { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, @@ -5034,6 +5058,7 @@ static PyMethodDef methods[] = { { (char *) "tail_n", py_guestfs_tail_n, METH_VARARGS, NULL }, { (char *) "df", py_guestfs_df, METH_VARARGS, NULL }, { (char *) "df_h", py_guestfs_df_h, METH_VARARGS, NULL }, + { (char *) "du", py_guestfs_du, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; |