[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 12/12] tools/xenstored: Remove hardcoded implicit path
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Thu, 24 Jul 2025 22:28:12 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HXAy8+XrxvcI4+I3pip5hEDLU6VX5kM2jBwL5ALEmE8=; b=dqs6PfvMAxpRhBufOZ7oKmzJAG7hwYUBaQ12SFF0POH91Shz55HgSjgkgsLRRFpgMnuGKAg5rJDwazF4PZ3oxn6yR846yS3TdYsfR6ZJ6369yu6nWBgVO08gLJu7fXIwKIfesEuW9k55L3iq+GaoB4FBcbf4kPUCWyzVBRGuGcP9n0gWW9yC+FZxojeQrtFqu8oxiVzh/32zq1zGbDfMkFCeN5b41rwLxNbe2OzP5oa0oecPJTEfIBznt4u1z7CEfKT7OMLzEkT9LYqJWVuJfHrQMGb7SE/53fJvnk6TqR+wS+J85qmJULMFObvKnyeQ2Ayll0b0wvKcGlBBZSnfag==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FlvwsQ+5SuwL3xlYTH50vXRP3ELsRtkrZXfykGQ4AJkRe6yL/ioI3B2UZCBPuFMof3RMJ6GVws0xyLXOxuz6S+C4AxmoC2HlTmjFT6KhhHL2Kx2a6oWDemylWxN8zvCov6d8pyCixwEl0HRQcYauDjdXsi0WUGjj7pu3LPMEnr34hV9I48mVG2WQ4D8xCGVCCtSVM82v1r+lKlMIeWgYWLejAdIWvlfk78LwMLGWIUw9bavxxkAxcvMm3UckdkrJryQ2UfvagumB7z9hvjOo36OSDN4ZZPamfiXVsTQ96zpd4ZxgaZ6gtk744F/dEH5dgKTZcSVwPCnZftZSmEAweg==
- Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Delivery-date: Fri, 25 Jul 2025 02:30:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Update get_implicit_path to return the correct value for a non-dom0
xenstored domain.
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
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
|