c577568
--- xen-4.8.0/tools/xenstore/xenstored_watch.c.orig	2016-12-05 12:03:27.000000000 +0000
c577568
+++ xen-4.8.0/tools/xenstore/xenstored_watch.c	2017-02-26 21:48:37.990376356 +0000
c577568
@@ -141,7 +141,7 @@
c577568
 		/* check if valid event */
c577568
 	} else {
c577568
 		relative = !strstarts(vec[0], "/");
c577568
-		vec[0] = canonicalize(conn, vec[0]);
c577568
+		vec[0] = xenstore_canonicalize(conn, vec[0]);
c577568
 		if (!is_valid_nodename(vec[0])) {
c577568
 			send_error(conn, EINVAL);
c577568
 			return;
c577568
@@ -192,7 +192,7 @@
c577568
 		return;
c577568
 	}
c577568
 
c577568
-	node = canonicalize(conn, vec[0]);
c577568
+	node = xenstore_canonicalize(conn, vec[0]);
c577568
 	list_for_each_entry(watch, &conn->watches, list) {
c577568
 		if (streq(watch->node, node) && streq(watch->token, vec[1])) {
c577568
 			list_del(&watch->list);
c577568
--- xen-4.8.0/tools/xenstore/xenstored_core.c.orig	2016-12-05 12:03:27.000000000 +0000
c577568
+++ xen-4.8.0/tools/xenstore/xenstored_core.c	2017-02-26 21:49:35.834496009 +0000
c577568
@@ -771,7 +771,7 @@
c577568
 	return strings;
c577568
 }
c577568
 
c577568
-char *canonicalize(struct connection *conn, const char *node)
c577568
+char *xenstore_canonicalize(struct connection *conn, const char *node)
c577568
 {
c577568
 	const char *prefix;
c577568
 
c577568
@@ -797,7 +797,7 @@
c577568
 	struct node *node;
c577568
 	const char *name = onearg(in);
c577568
 
c577568
-	name = canonicalize(conn, name);
c577568
+	name = xenstore_canonicalize(conn, name);
c577568
 	node = get_node(conn, in, name, XS_PERM_READ);
c577568
 	if (!node) {
c577568
 		send_error(conn, errno);
c577568
@@ -812,7 +812,7 @@
c577568
 	struct node *node;
c577568
 	const char *name = onearg(in);
c577568
 
c577568
-	name = canonicalize(conn, name);
c577568
+	name = xenstore_canonicalize(conn, name);
c577568
 	node = get_node(conn, in, name, XS_PERM_READ);
c577568
 	if (!node) {
c577568
 		send_error(conn, errno);
c577568
@@ -949,7 +949,7 @@
c577568
 	offset = strlen(vec[0]) + 1;
c577568
 	datalen = in->used - offset;
c577568
 
c577568
-	name = canonicalize(conn, vec[0]);
c577568
+	name = xenstore_canonicalize(conn, vec[0]);
c577568
 	node = get_node(conn, in, name, XS_PERM_WRITE);
c577568
 	if (!node) {
c577568
 		/* No permissions, invalid input? */
c577568
@@ -987,7 +987,7 @@
c577568
 		return;
c577568
 	}
c577568
 
c577568
-	name = canonicalize(conn, name);
c577568
+	name = xenstore_canonicalize(conn, name);
c577568
 	node = get_node(conn, in, name, XS_PERM_WRITE);
c577568
 
c577568
 	/* If it already exists, fine. */
c577568
@@ -1105,7 +1105,7 @@
c577568
 	struct node *node;
c577568
 	const char *name = onearg(in);
c577568
 
c577568
-	name = canonicalize(conn, name);
c577568
+	name = xenstore_canonicalize(conn, name);
c577568
 	node = get_node(conn, in, name, XS_PERM_WRITE);
c577568
 	if (!node) {
c577568
 		/* Didn't exist already?  Fine, if parent exists. */
c577568
@@ -1142,7 +1142,7 @@
c577568
 	char *strings;
c577568
 	unsigned int len;
c577568
 
c577568
-	name = canonicalize(conn, name);
c577568
+	name = xenstore_canonicalize(conn, name);
c577568
 	node = get_node(conn, in, name, XS_PERM_READ);
c577568
 	if (!node) {
c577568
 		send_error(conn, errno);
c577568
@@ -1170,7 +1170,7 @@
c577568
 	}
c577568
 
c577568
 	/* First arg is node name. */
c577568
-	name = canonicalize(conn, in->buffer);
c577568
+	name = xenstore_canonicalize(conn, in->buffer);
c577568
 	permstr = in->buffer + strlen(in->buffer) + 1;
c577568
 	num--;
c577568
 
c577568
--- xen-4.8.0/tools/xenstore/xenstored_core.h.orig	2016-12-05 12:03:27.000000000 +0000
c577568
+++ xen-4.8.0/tools/xenstore/xenstored_core.h	2017-02-26 21:50:04.480545722 +0000
c577568
@@ -142,7 +142,7 @@
c577568
 void send_error(struct connection *conn, int error);
c577568
 
c577568
 /* Canonicalize this path if possible. */
c577568
-char *canonicalize(struct connection *conn, const char *node);
c577568
+char *xenstore_canonicalize(struct connection *conn, const char *node);
c577568
 
c577568
 /* Check if node is an event node. */
c577568
 bool check_event_node(const char *node);
c577568
--- xen-4.8.0/tools/console/testsuite/console-dom0.c.orig	2016-12-05 12:03:27.000000000 +0000
c577568
+++ xen-4.8.0/tools/console/testsuite/console-dom0.c	2017-02-26 21:52:24.554678631 +0000
c577568
@@ -18,7 +18,7 @@
c577568
 	}
c577568
 }
c577568
 
c577568
-static void canonicalize(char *buffer)
c577568
+static void xenstore_canonicalize(char *buffer)
c577568
 {
c577568
 	char *reader, *writer;
c577568
 
c577568
@@ -51,7 +51,7 @@
c577568
 	tcsetattr(STDOUT_FILENO, TCSAFLUSH, &term);
c577568
 
c577568
 	while ((line = fgets(buffer, sizeof(buffer), stdin))) {
c577568
-		canonicalize(line);
c577568
+		xenstore_canonicalize(line);
c577568
 
c577568
 		if (strcmp(line, "!!!XEN Test Begin!!!\n") == 0) {
c577568
 			break;
c577568
@@ -76,7 +76,7 @@
c577568
 		return 1;
c577568
 	}
c577568
 
c577568
-	canonicalize(line);
c577568
+	xenstore_canonicalize(line);
c577568
 	if (strcmp(line, "Seed Okay.\n") != 0) {
c577568
 		fprintf(stderr, "Incorrect seed acknowledgement.\n");
c577568
 		fprintf(stderr, "[%s]", line);
c577568
@@ -104,7 +104,7 @@
c577568
 				return 1;
c577568
 			}
c577568
 
c577568
-			canonicalize(line);
c577568
+			xenstore_canonicalize(line);
c577568
 			fprintf(stderr, "%s", line);
c577568
 		} while (strcmp(line, "Okay.\n") != 0);
c577568
 
c577568
--- xen-4.8.0/tools/console/testsuite/console-domU.c.orig	2016-12-05 12:03:27.000000000 +0000
c577568
+++ xen-4.8.0/tools/console/testsuite/console-domU.c	2017-02-26 21:52:50.320622804 +0000
c577568
@@ -6,7 +6,7 @@
c577568
 #include <termios.h>
c577568
 #include <unistd.h>
c577568
 
c577568
-static void canonicalize(char *buffer)
c577568
+static void xenstore_canonicalize(char *buffer)
c577568
 {
c577568
 	char *reader, *writer;
c577568
 
c577568
@@ -45,7 +45,7 @@
c577568
 		return 1;
c577568
 	}
c577568
 
c577568
-	canonicalize(line);
c577568
+	xenstore_canonicalize(line);
c577568
 	seed = strtoul(line, 0, 0);
c577568
 
c577568
 	printf("Seed Okay.\n"); fflush(stdout);