diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-30 23:10:22 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-30 23:10:22 +0100 |
commit | e118c14b9552de311cbc1734e03a3226b484c1e8 (patch) | |
tree | 6e7952088d10df67004db83bfe2f370e2e4ffba2 /daemon/stubs.c | |
parent | b55bf8158f0b7f6b1760b7b3b5f7c1274a149127 (diff) | |
download | libguestfs-e118c14b9552de311cbc1734e03a3226b484c1e8.tar.gz libguestfs-e118c14b9552de311cbc1734e03a3226b484c1e8.tar.xz libguestfs-e118c14b9552de311cbc1734e03a3226b484c1e8.zip |
Generated code for grub-install command.
Diffstat (limited to 'daemon/stubs.c')
-rw-r--r-- | daemon/stubs.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/daemon/stubs.c b/daemon/stubs.c index 937913f3..ee279977 100644 --- a/daemon/stubs.c +++ b/daemon/stubs.c @@ -2127,6 +2127,32 @@ done: xdr_free ((xdrproc_t) xdr_guestfs_zero_args, (char *) &args); } +static void grub_install_stub (XDR *xdr_in) +{ + int r; + struct guestfs_grub_install_args args; + const char *root; + const char *device; + + memset (&args, 0, sizeof args); + + if (!xdr_guestfs_grub_install_args (xdr_in, &args)) { + reply_with_error ("%s: daemon failed to decode procedure arguments", "grub_install"); + return; + } + root = args.root; + device = args.device; + + r = do_grub_install (root, device); + if (r == -1) + /* do_grub_install has already called reply_with_error */ + goto done; + + reply (NULL, NULL); +done: + xdr_free ((xdrproc_t) xdr_guestfs_grub_install_args, (char *) &args); +} + void dispatch_incoming_message (XDR *xdr_in) { switch (proc_nr) { @@ -2385,6 +2411,9 @@ void dispatch_incoming_message (XDR *xdr_in) case GUESTFS_PROC_ZERO: zero_stub (xdr_in); break; + case GUESTFS_PROC_GRUB_INSTALL: + grub_install_stub (xdr_in); + break; default: reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr); } |