summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-06-04 14:59:16 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-06-04 15:06:27 +0100
commitb6adf09c4d2cc3f1d0285950c151b1fd7688ec67 (patch)
tree7ff59df24162a39824e65bf5e4fd0b4dafcad13a /daemon
parent2ef06eacc2be08b0268c98a4d157176aff9356e0 (diff)
downloadlibguestfs-b6adf09c4d2cc3f1d0285950c151b1fd7688ec67.tar.gz
libguestfs-b6adf09c4d2cc3f1d0285950c151b1fd7688ec67.tar.xz
libguestfs-b6adf09c4d2cc3f1d0285950c151b1fd7688ec67.zip
Generated code for the 'sleep' command.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/actions.h1
-rw-r--r--daemon/stubs.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/daemon/actions.h b/daemon/actions.h
index 1615cfb1..2c869474 100644
--- a/daemon/actions.h
+++ b/daemon/actions.h
@@ -129,3 +129,4 @@ extern int do_lvresize (const char *device, int mbytes);
extern int do_resize2fs (const char *device);
extern char **do_find (const char *directory);
extern int do_e2fsck_f (const char *device);
+extern int do_sleep (int secs);
diff --git a/daemon/stubs.c b/daemon/stubs.c
index 51a75624..0e6af849 100644
--- a/daemon/stubs.c
+++ b/daemon/stubs.c
@@ -2719,6 +2719,30 @@ done:
xdr_free ((xdrproc_t) xdr_guestfs_e2fsck_f_args, (char *) &args);
}
+static void sleep_stub (XDR *xdr_in)
+{
+ int r;
+ struct guestfs_sleep_args args;
+ int secs;
+
+ memset (&args, 0, sizeof args);
+
+ if (!xdr_guestfs_sleep_args (xdr_in, &args)) {
+ reply_with_error ("%s: daemon failed to decode procedure arguments", "sleep");
+ return;
+ }
+ secs = args.secs;
+
+ r = do_sleep (secs);
+ if (r == -1)
+ /* do_sleep has already called reply_with_error */
+ goto done;
+
+ reply (NULL, NULL);
+done:
+ xdr_free ((xdrproc_t) xdr_guestfs_sleep_args, (char *) &args);
+}
+
void dispatch_incoming_message (XDR *xdr_in)
{
switch (proc_nr) {
@@ -3046,6 +3070,9 @@ void dispatch_incoming_message (XDR *xdr_in)
case GUESTFS_PROC_E2FSCK_F:
e2fsck_f_stub (xdr_in);
break;
+ case GUESTFS_PROC_SLEEP:
+ sleep_stub (xdr_in);
+ break;
default:
reply_with_error ("dispatch_incoming_message: unknown procedure number %d", proc_nr);
}