]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Fix control/shutdown acknowledgement
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Apr 2018 16:21:38 +0000 (17:21 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Apr 2018 16:21:38 +0000 (17:21 +0100)
The code in FdoSuspend() currently acknowledges a suspend request by
removing the control/shutdown node from xenstore. This is not correct.

The documentation [1] states that a request should be acknowledged by
writing the empty string. This patch makes the code behave correctly.

[1] xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/xenstore-paths.markdown;hb=HEAD#l413

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/fdo.c

index 7f67b619b298602bb009d8acf149e02e5a8c4f93..8ca8f5207bd50f5f41fbf18d23066b54c27e2bb8 100644 (file)
@@ -1524,11 +1524,12 @@ FdoSuspend(
         if (!NT_SUCCESS(status))
             goto loop;
 
-        (VOID) XENBUS_STORE(Remove,
+        (VOID) XENBUS_STORE(Printf,
                             &Fdo->StoreInterface,
                             NULL,
                             "control",
-                            "shutdown");
+                            "shutdown",
+                            "");
 
         (VOID) XENBUS_SUSPEND(Trigger, &Fdo->SuspendInterface);