summaryrefslogtreecommitdiffstats
path: root/python/guestfs-py.c
diff options
context:
space:
mode:
Diffstat (limited to 'python/guestfs-py.c')
-rw-r--r--python/guestfs-py.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/python/guestfs-py.c b/python/guestfs-py.c
index 6ac3bd97..71ef85e7 100644
--- a/python/guestfs-py.c
+++ b/python/guestfs-py.c
@@ -1179,6 +1179,31 @@ py_guestfs_add_cdrom (PyObject *self, PyObject *args)
}
static PyObject *
+py_guestfs_add_drive_ro (PyObject *self, PyObject *args)
+{
+ PyObject *py_g;
+ guestfs_h *g;
+ PyObject *py_r;
+ int r;
+ const char *filename;
+
+ if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_add_drive_ro",
+ &py_g, &filename))
+ return NULL;
+ g = get_handle (py_g);
+
+ r = guestfs_add_drive_ro (g, filename);
+ 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_config (PyObject *self, PyObject *args)
{
PyObject *py_g;
@@ -4416,6 +4441,7 @@ static PyMethodDef methods[] = {
{ (char *) "kill_subprocess", py_guestfs_kill_subprocess, METH_VARARGS, NULL },
{ (char *) "add_drive", py_guestfs_add_drive, METH_VARARGS, NULL },
{ (char *) "add_cdrom", py_guestfs_add_cdrom, METH_VARARGS, NULL },
+ { (char *) "add_drive_ro", py_guestfs_add_drive_ro, METH_VARARGS, NULL },
{ (char *) "config", py_guestfs_config, METH_VARARGS, NULL },
{ (char *) "set_qemu", py_guestfs_set_qemu, METH_VARARGS, NULL },
{ (char *) "get_qemu", py_guestfs_get_qemu, METH_VARARGS, NULL },