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:
Jason Andryuk authored and Jan Beulich committed 2025-08-19 11:04:13 +02:00
1 parent 671e80d990
commit 2e8067a773
1 file changed
+6 -1
+6 -1
View File
@@ -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.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.