mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Generated code for ntfs_3g_probe command.
This commit is contained in:
@@ -4431,6 +4431,31 @@ py_guestfs_sleep (PyObject *self, PyObject *args)
|
||||
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 },
|
||||
@@ -4595,6 +4620,7 @@ static PyMethodDef methods[] = {
|
||||
{ (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 }
|
||||
};
|
||||
|
||||
|
||||
@@ -1604,3 +1604,20 @@ class GuestFS:
|
||||
"""
|
||||
return libguestfsmod.sleep (self._o, secs)
|
||||
|
||||
def ntfs_3g_probe (self, rw, device):
|
||||
u"""This command runs the ntfs-3g.probe(8) command which
|
||||
probes an NTFS "device" for mountability. (Not all NTFS
|
||||
volumes can be mounted read-write, and some cannot be
|
||||
mounted at all).
|
||||
|
||||
"rw" is a boolean flag. Set it to true if you want to
|
||||
test if the volume can be mounted read-write. Set it to
|
||||
false if you want to test if the volume can be mounted
|
||||
read-only.
|
||||
|
||||
The return value is an integer which 0 if the operation
|
||||
would succeed, or some non-zero value documented in the
|
||||
ntfs-3g.probe(8) manual page.
|
||||
"""
|
||||
return libguestfsmod.ntfs_3g_probe (self._o, rw, device)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user