From 3d405489212d4f87bc382112dda1228f83db2453 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 9 Apr 2008 15:59:54 +0100 Subject: [PATCH] xenstore: fix canonicalize for metanodes Signed-off-by: Tim Deegan --- tools/xenstore/xenstored_core.c | 2 +- tools/xenstore/xenstored_watch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index a643f2d969..657322ab8c 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -722,7 +722,7 @@ char *canonicalize(struct connection *conn, const char *node) { const char *prefix; - if (!node || strstarts(node, "/")) + if (!node || (node[0] == '/') || (node[0] == '@')) return (char *)node; prefix = get_implicit_path(conn); if (prefix) diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 8e3e4f2b61..16d30899d4 100644 --- a/tools/xenstore/xenstored_watch.c +++ b/tools/xenstore/xenstored_watch.c @@ -183,7 +183,7 @@ void do_unwatch(struct connection *conn, struct buffered_data *in) return; } - node = strstarts(vec[0], "@") ? vec[0] : canonicalize(conn, vec[0]); + node = canonicalize(conn, vec[0]); list_for_each_entry(watch, &conn->watches, list) { if (streq(watch->node, node) && streq(watch->token, vec[1])) { list_del(&watch->list); -- 2.39.5