diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 10:09:13 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 10:09:13 +0100 |
commit | f450ce75b754fb869b34433c0126f7bb592b141b (patch) | |
tree | d5871faf1cc109629f7df0b59e1eb1403199ccf4 /python/guestfs-py.c | |
parent | 62ccc07e744d5ebfb45d9344827d36f9f61699f4 (diff) | |
download | libguestfs-f450ce75b754fb869b34433c0126f7bb592b141b.tar.gz libguestfs-f450ce75b754fb869b34433c0126f7bb592b141b.tar.xz libguestfs-f450ce75b754fb869b34433c0126f7bb592b141b.zip |
Generated code for 'wc_*' commands.
Diffstat (limited to 'python/guestfs-py.c')
-rw-r--r-- | python/guestfs-py.c | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 263d3d9f..07f3c460 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -4631,6 +4631,78 @@ py_guestfs_mkdtemp (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_wc_l (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + const char *path; + + if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_wc_l", + &py_g, &path)) + return NULL; + g = get_handle (py_g); + + r = guestfs_wc_l (g, path); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + py_r = PyInt_FromLong ((long) r); + return py_r; +} + +static PyObject * +py_guestfs_wc_w (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + const char *path; + + if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_wc_w", + &py_g, &path)) + return NULL; + g = get_handle (py_g); + + r = guestfs_wc_w (g, path); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + py_r = PyInt_FromLong ((long) r); + return py_r; +} + +static PyObject * +py_guestfs_wc_c (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + const char *path; + + if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_wc_c", + &py_g, &path)) + return NULL; + g = get_handle (py_g); + + r = guestfs_wc_c (g, path); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + py_r = PyInt_FromLong ((long) r); + return py_r; +} + static PyMethodDef methods[] = { { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, @@ -4803,6 +4875,9 @@ static PyMethodDef methods[] = { { (char *) "scrub_file", py_guestfs_scrub_file, METH_VARARGS, NULL }, { (char *) "scrub_freespace", py_guestfs_scrub_freespace, METH_VARARGS, NULL }, { (char *) "mkdtemp", py_guestfs_mkdtemp, METH_VARARGS, NULL }, + { (char *) "wc_l", py_guestfs_wc_l, METH_VARARGS, NULL }, + { (char *) "wc_w", py_guestfs_wc_w, METH_VARARGS, NULL }, + { (char *) "wc_c", py_guestfs_wc_c, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; |