X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=python%2Fguestfs-py.c;h=8e90d762b8602268a7e8330fcea643e9ae22d72c;hb=b7f39224e17eecf53ea2671122d4b3176e4d202f;hp=71ef85e7bcc80f701193439afe916fb38b645a94;hpb=d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e;p=libguestfs.git diff --git a/python/guestfs-py.c b/python/guestfs-py.c index 71ef85e..8e90d76 100644 --- a/python/guestfs-py.c +++ b/python/guestfs-py.c @@ -4406,6 +4406,56 @@ py_guestfs_e2fsck_f (PyObject *self, PyObject *args) return py_r; } +static PyObject * +py_guestfs_sleep (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + int secs; + + if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_sleep", + &py_g, &secs)) + return NULL; + g = get_handle (py_g); + + r = guestfs_sleep (g, secs); + 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_ntfs_3g_probe (PyObject *self, PyObject *args) +{ + PyObject *py_g; + guestfs_h *g; + PyObject *py_r; + int r; + int rw; + const char *device; + + if (!PyArg_ParseTuple (args, (char *) "Ois:guestfs_ntfs_3g_probe", + &py_g, &rw, &device)) + return NULL; + g = get_handle (py_g); + + r = guestfs_ntfs_3g_probe (g, rw, device); + 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 }, @@ -4569,6 +4619,8 @@ static PyMethodDef methods[] = { { (char *) "resize2fs", py_guestfs_resize2fs, METH_VARARGS, NULL }, { (char *) "find", py_guestfs_find, METH_VARARGS, NULL }, { (char *) "e2fsck_f", py_guestfs_e2fsck_f, METH_VARARGS, NULL }, + { (char *) "sleep", py_guestfs_sleep, METH_VARARGS, NULL }, + { (char *) "ntfs_3g_probe", py_guestfs_ntfs_3g_probe, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } };