Skip to contentSkip to conversation

cxenstored: avoid using hardcoded paths

PATCH In review Wei Liu 2 participants 2 messages Oct 13, 2015 – Oct 14, 2015

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 cxenstored: avoid using hardcoded paths

Use library functions which return socket paths instead.

---
 tools/xenstore/xenstored_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/xenstore/xenstored_core.c +2 -2
index eae4d31..bddec70 100644
@@ -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,
Signature · 1 line
2.1.4