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

[xen master] tools/xenstored: Remove hardcoded implicit path



commit 2e8067a773e2a2fa7268e065f0c97dfda7b0638e
Author:     Jason Andryuk <jason.andryuk@xxxxxxx>
AuthorDate: Fri Aug 15 17:35:56 2025 -0400
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Aug 19 11:04:13 2025 +0200

    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@xxxxxxx>
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
 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.
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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