[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v6 8/8] tools/xenstored: Remove hardcoded implicit path


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Fri, 15 Aug 2025 17:35:56 -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=6o2KKFuYGe9DCLPgWqQt6Y96aL0o/a+ZBCaV0wZywVI=; b=QdfTS1pOZKvD3B5eEzws+XGpp/6yagNXfnA+ee1tp80h9BNzBNWfbS/j+9A7cSlfgo10b12QVbjD5jelWlciQbt8jevb1o+hievnYDjASqsLnLa+acskDmdhkwJroTlU4p8vfpGC6/5B2pbDDJA9h+A6tN9xnW0IdpOl9JtG6XnxGGhykxKTIgoFUEVriqHLRSeGOlAWii7ItVBJsMrmW3zJes4ZdgtrQPrk6nIj1SvvvTaiQIi4ZwXWkvlX5r9Bg7rVIcwMZrIVIALNdB8yGn45f8vIS7quTec/3F0aTzrfK6NhID2NUM5yUYh4McN3kxSAaYA3sM1lrvtvVTpbYA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qcbn4taXH5N+gmU7zSCkzic2vVK9BfbjPL0GPbXGM5OYPqJ1P8/p8On1svOLLNO7L7ycHflBmauwSB/BgQ1SUKqAdk9dEDNEXXUQoe2I7xaIHf0Ab/21EBJKM0AnRpvFL5dOjAwTwjUicaDOlilEpSWv9LwCkYfTMB4ioVn4e4gje7mq8J7rnsyHmyuRbgmFlEix/OZ1tlHsJ1aU1laIxSzCZ5BDj+0YRCXrtdYV4qQ9jVKAaurApdrYcPsL7+ZLBoYvXiE+mHR0y/ipOytViNB1U9uxuuMJuX8mMJmeXofa9/hombCM461FuaC/HK+CITLzMFhVZe+rwz+Rz4mBxA==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Fri, 15 Aug 2025 21:36:11 +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>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
v5:
R-b: Juergen
---
 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 cf5a54965a..694d68670a 100644
--- a/tools/xenstored/domain.c
+++ b/tools/xenstored/domain.c
@@ -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.
-- 
2.50.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.