diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-13 23:58:33 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-13 23:58:33 +0100 |
commit | adefe14e308a0f8cf73f9c60693a3dbbded157b9 (patch) | |
tree | cc1ecd798dd05c422ddcf99c1cdbef307aacb8fd /daemon/stubs.c | |
parent | 42283403886da648bb239177369aa65c0a659255 (diff) | |
download | libguestfs-adefe14e308a0f8cf73f9c60693a3dbbded157b9.tar.gz libguestfs-adefe14e308a0f8cf73f9c60693a3dbbded157b9.tar.xz libguestfs-adefe14e308a0f8cf73f9c60693a3dbbded157b9.zip |
Generated files for file(1) command.
Diffstat (limited to 'daemon/stubs.c')
-rw-r--r-- | daemon/stubs.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/daemon/stubs.c b/daemon/stubs.c index 4540ca56..af0f14c3 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -1137,6 +1137,33 @@ static void lvm_remove_all_stub (XDR *xdr_in) done: ; } +static void file_stub (XDR *xdr_in) +{ + char *r; + struct guestfs_file_args args; + const char *path; + + memset (&args, 0, sizeof args); + + if (!xdr_guestfs_file_args (xdr_in, &args)) { + reply_with_error ("%s: daemon failed to decode procedure arguments", "file"); + return; + } + path = args.path; + + r = do_file (path); + if (r == NULL) + /* do_file has already called reply_with_error */ + goto done; + + struct guestfs_file_ret ret; + ret.description = r; + reply ((xdrproc_t) &xdr_guestfs_file_ret, (char *) &ret); + free (r); +done: + xdr_free ((xdrproc_t) xdr_guestfs_file_args, (char *) &args); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -1284,6 +1311,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_LVM_REMOVE_ALL: lvm_remove_all_stub (xdr_in); break; + case GUESTFS_PROC_FILE: + file_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } |