Update get_implicit_path to return the correct value for a non-dom0
xenstored domain.
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
---
tools/xenstored/domain.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c
index f1527a6db7..ae59b6e60b 100644
--- a/tools/xenstored/domain.c
+++ b/tools/xenstored/domain.c
@@ -1238,11 +1238,13 @@ static int close_xgt_handle(void *_handle)
return 0;
}
+static char store_domain_path[] = "/local/domain/65535";
+
/* Returns the implicit path of a connection (only domains have this) */
const char *get_implicit_path(const struct connection *conn)
{
if (!conn->domain)
- return "/local/domain/0";
+ return store_domain_path;
return conn->domain->path;
}
@@ -1309,6 +1311,9 @@ void init_domains(void)
}
}
+ snprintf(store_domain_path, sizeof(store_domain_path),
+ "/local/domain/%u", store_domid);
+
for (unsigned int i = 0; i < nr_domids; i++) {
evtchn_port_t port;
struct domain *domain;
--
2.50.1