]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
cxenstored: avoid using hardcoded paths
authorWei Liu <wei.liu2@citrix.com>
Tue, 13 Oct 2015 13:40:28 +0000 (14:40 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 14 Oct 2015 10:05:35 +0000 (11:05 +0100)
Use library functions which return socket paths instead.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/xenstore/xenstored_core.c

index 25a548dc44b6bd10c4f70133e9732e50f8d246a1..3c0307e1430cdb0c11586933b20be225134537f0 100644 (file)
@@ -1769,8 +1769,8 @@ static int xs_get_sd_fd(const char *connect_to)
 
 static int xs_validate_active_socket(const char *connect_to)
 {
-       if ((strcmp("/var/run/xenstored/socket_ro", connect_to) != 0) &&
-           (strcmp("/var/run/xenstored/socket", connect_to) != 0)) {
+       if ((strcmp(xs_daemon_socket_ro(), connect_to) != 0) &&
+           (strcmp(xs_daemon_socket(), connect_to) != 0)) {
                sd_notifyf(0, "STATUS=unexpected socket: %s\n"
                           "ERRNO=%i",
                           connect_to,