diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 12:16:08 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 12:16:08 +0100 |
commit | f47dafd23186938a22d41739d9bc695c7760b912 (patch) | |
tree | a6e5bf03a63cae2eeca269505724ae5c5ba11020 /daemon/stubs.c | |
parent | d9ea3e8d979c3ade1b21f27083788fd33fa3b1fa (diff) | |
download | libguestfs-f47dafd23186938a22d41739d9bc695c7760b912.tar.gz libguestfs-f47dafd23186938a22d41739d9bc695c7760b912.tar.xz libguestfs-f47dafd23186938a22d41739d9bc695c7760b912.zip |
Generated code for 'equal' command.
Diffstat (limited to 'daemon/stubs.c')
-rw-r--r-- | daemon/stubs.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/daemon/stubs.c b/daemon/stubs.c index f992bdf6..fd9c7eae 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2284,6 +2284,34 @@ static void ping_daemon_stub (XDR *xdr_in) done: ; } +static void equal_stub (XDR *xdr_in) +{ + int r; + struct guestfs_equal_args args; + const char *file1; + const char *file2; + + memset (&args, 0, sizeof args); + + if (!xdr_guestfs_equal_args (xdr_in, &args)) { + reply_with_error ("%s: daemon failed to decode procedure arguments", "equal"); + return; + } + file1 = args.file1; + file2 = args.file2; + + r = do_equal (file1, file2); + if (r == -1) + /* do_equal has already called reply_with_error */ + goto done; + + struct guestfs_equal_ret ret; + ret.equality = r; + reply ((xdrproc_t) &xdr_guestfs_equal_ret, (char *) &ret); +done: + xdr_free ((xdrproc_t) xdr_guestfs_equal_args, (char *) &args); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -2563,6 +2591,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_PING_DAEMON: ping_daemon_stub (xdr_in); break; + case GUESTFS_PROC_EQUAL: + equal_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } |