diff options
author | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:53 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:53 +0100 |
commit | ca49c50e06834bbc68e21630a5552c57494f2b53 (patch) | |
tree | 0d1c98fd038abf05d7491f044c8affbfb461ce00 /python/guestfs-py.c | |
parent | 0695593702b8612b500ff0b3bf800e5934f9b56e (diff) | |
download | libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.gz libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.xz libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.zip |
Generated code for lvresize, resize2fs.
Diffstat (limited to 'python/guestfs-py.c')
-rw-r--r-- | python/guestfs-py.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/python/guestfs-py.c b/python/guestfs-py.c index e967bd94..cd1014fc 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -3612,6 +3612,57 @@ py_guestfs_vg_activate (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_lvresize (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + const char *device; + int mbytes; + + if (!PyArg_ParseTuple (args, (char *) "Osi:guestfs_lvresize", + &py_g, &device, &mbytes)) + return NULL; + g = get_handle (py_g); + + r = guestfs_lvresize (g, device, mbytes); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + Py_INCREF (Py_None); + py_r = Py_None; + return py_r; +} + +static PyObject * +py_guestfs_resize2fs (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + const char *device; + + if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_resize2fs", + &py_g, &device)) + return NULL; + g = get_handle (py_g); + + r = guestfs_resize2fs (g, device); + if (r == -1) { + PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); + return NULL; + } + + Py_INCREF (Py_None); + py_r = Py_None; + return py_r; +} + static PyMethodDef methods[] = { { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, @@ -3743,6 +3794,8 @@ static PyMethodDef methods[] = { { (char *) "sfdisk_disk_geometry", py_guestfs_sfdisk_disk_geometry, METH_VARARGS, NULL }, { (char *) "vg_activate_all", py_guestfs_vg_activate_all, METH_VARARGS, NULL }, { (char *) "vg_activate", py_guestfs_vg_activate, METH_VARARGS, NULL }, + { (char *) "lvresize", py_guestfs_lvresize, METH_VARARGS, NULL }, + { (char *) "resize2fs", py_guestfs_resize2fs, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; |