diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 11:18:53 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-01 11:18:53 +0100 |
commit | 9222136ac9b2e404dba128b1ac74dacaa8bf1038 (patch) | |
tree | 84d74f0c966b925c3e22bf3322256df10455d94b /daemon/stubs.c | |
parent | 2dc9e8a858b62830d15a8186fe575eb7903d2171 (diff) | |
download | libguestfs-9222136ac9b2e404dba128b1ac74dacaa8bf1038.tar.gz libguestfs-9222136ac9b2e404dba128b1ac74dacaa8bf1038.tar.xz libguestfs-9222136ac9b2e404dba128b1ac74dacaa8bf1038.zip |
Generated code for drop-caches command.
Diffstat (limited to 'daemon/stubs.c')
-rw-r--r-- | daemon/stubs.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/daemon/stubs.c b/daemon/stubs.c index ddd3fced..64d66a96 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2231,6 +2231,30 @@ done: xdr_free ((xdrproc_t) xdr_guestfs_mv_args, (char *) &args); } +static void drop_caches_stub (XDR *xdr_in) +{ + int r; + struct guestfs_drop_caches_args args; + int whattodrop; + + memset (&args, 0, sizeof args); + + if (!xdr_guestfs_drop_caches_args (xdr_in, &args)) { + reply_with_error ("%s: daemon failed to decode procedure arguments", "drop_caches"); + return; + } + whattodrop = args.whattodrop; + + r = do_drop_caches (whattodrop); + if (r == -1) + /* do_drop_caches has already called reply_with_error */ + goto done; + + reply (NULL, NULL); +done: + xdr_free ((xdrproc_t) xdr_guestfs_drop_caches_args, (char *) &args); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -2501,6 +2525,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_MV: mv_stub (xdr_in); break; + case GUESTFS_PROC_DROP_CACHES: + drop_caches_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } |