mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Generated code for 'equal' command.
This commit is contained in:
@@ -3229,6 +3229,31 @@ py_guestfs_ping_daemon (PyObject *self, PyObject *args)
|
||||
return py_r;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
py_guestfs_equal (PyObject *self, PyObject *args)
|
||||
{
|
||||
PyObject *py_g;
|
||||
guestfs_h *g;
|
||||
PyObject *py_r;
|
||||
int r;
|
||||
const char *file1;
|
||||
const char *file2;
|
||||
|
||||
if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_equal",
|
||||
&py_g, &file1, &file2))
|
||||
return NULL;
|
||||
g = get_handle (py_g);
|
||||
|
||||
r = guestfs_equal (g, file1, file2);
|
||||
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 },
|
||||
@@ -3345,6 +3370,7 @@ static PyMethodDef methods[] = {
|
||||
{ (char *) "drop_caches", py_guestfs_drop_caches, METH_VARARGS, NULL },
|
||||
{ (char *) "dmesg", py_guestfs_dmesg, METH_VARARGS, NULL },
|
||||
{ (char *) "ping_daemon", py_guestfs_ping_daemon, METH_VARARGS, NULL },
|
||||
{ (char *) "equal", py_guestfs_equal, METH_VARARGS, NULL },
|
||||
{ NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
|
||||
@@ -1242,3 +1242,12 @@ class GuestFS:
|
||||
"""
|
||||
return libguestfsmod.ping_daemon (self._o)
|
||||
|
||||
def equal (self, file1, file2):
|
||||
u"""This compares the two files "file1" and "file2" and
|
||||
returns true if their content is exactly equal, or false
|
||||
otherwise.
|
||||
|
||||
The external cmp(1) program is used for the comparison.
|
||||
"""
|
||||
return libguestfsmod.equal (self._o, file1, file2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user