mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xenstored: Remove hardcoded implicit path
Update get_implicit_path to return the correct value for a non-dom0 xenstored domain. Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Reviewed-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
671e80d990
commit
2e8067a773
1 file changed
+6
-1
@@ -1312,11 +1312,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;
|
||||
}
|
||||
|
||||
@@ -1386,6 +1388,9 @@ void init_domains(void)
|
||||
if (store_domid == DOMID_INVALID)
|
||||
barf("Could not determine xenstore domid\n");
|
||||
|
||||
snprintf(store_domain_path, sizeof(store_domain_path),
|
||||
"/local/domain/%u", store_domid);
|
||||
|
||||
/*
|
||||
* Privileged domid must be first to setup structures for firing the
|
||||
* special watches.
|
||||
|
||||