]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-35920: add hypercall simulator support for SCHEDOP_remote_shutdown
authorDavid Scott <dave.scott@eu.citrix.com>
Thu, 4 Feb 2010 22:29:53 +0000 (22:29 +0000)
committerDavid Scott <dave.scott@eu.citrix.com>
Thu, 4 Feb 2010 22:29:53 +0000 (22:29 +0000)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xc/xc_lib_injection.c

index 6cf3dfe8159c1dfcdacef043a167e1785c500722..beefb503f5621dfae332884dc59cc4ce115c5fd4 100644 (file)
@@ -20,6 +20,8 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
+#define HYPCALLcmd "hypcall"
+
 static int fake_interface_open(void)
 {
        struct sockaddr_un remote;
@@ -330,7 +332,11 @@ static int fake_xen_schedop(int handle, unsigned long cmd, sched_remote_shutdown
 {
        switch (cmd) {
        case SCHEDOP_remote_shutdown:
-               return 0;
+               marshall_command(handle, "%s,%d,%d,%d\n", HYPCALLcmd,
+                                                1, 
+                                arg->domain_id,
+                                                arg->reason);
+               return unmarshall_return(handle);
        default:
                return -EINVAL;
        }