aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_core.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-09-15 11:08:05 +0100
committerOlaf Hering <olaf@aepfle.de>2011-09-15 11:08:05 +0100
commit1f9d04fb021cbf35cc420d401a88c696d6524c14 (patch)
treefaf66934ac97c71f944e7d33cd558295fc03bd02 /tools/xenstore/xenstored_core.c
parentdcbc297aea6a159f2f5fad5de84666f23c2d17ad (diff)
downloadxen-1f9d04fb021cbf35cc420d401a88c696d6524c14.tar.gz
xen-1f9d04fb021cbf35cc420d401a88c696d6524c14.tar.bz2
xen-1f9d04fb021cbf35cc420d401a88c696d6524c14.zip
xenstored: allow guest to shutdown all its watches/transactions
During kexec all old watches have to be removed, otherwise the new kernel will receive unexpected events. Allow a guest to reset itself and cleanup all of its watches and transactions. Add a new XS_RESET_WATCHES command to do the reset on behalf of the guest. (Changes by iwj: specify the argument to be a single nul byte. Permit read-only clients to use the new command.) Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenstore/xenstored_core.c')
-rw-r--r--tools/xenstore/xenstored_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 3b1955a5c0..5d308cad86 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -120,6 +120,7 @@ static char *sockmsg_string(enum xsd_sockmsg_type type)
case XS_IS_DOMAIN_INTRODUCED: return "XS_IS_DOMAIN_INTRODUCED";
case XS_RESUME: return "RESUME";
case XS_SET_TARGET: return "SET_TARGET";
+ case XS_RESET_WATCHES: return "RESET_WATCHES";
default:
return "**UNKNOWN**";
}
@@ -1242,6 +1243,10 @@ static void process_message(struct connection *conn, struct buffered_data *in)
do_set_target(conn, in);
break;
+ case XS_RESET_WATCHES:
+ do_reset_watches(conn);
+ break;
+
default:
eprintf("Client unknown operation %i", in->hdr.msg.type);
send_error(conn, ENOSYS);