xenstored: return EINVAL for attempt to watch invalid path
authorIan Campbell <ian.campbell@citrix.com>
Thu, 21 Oct 2010 16:56:51 +0000 (17:56 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 Oct 2010 16:56:51 +0000 (17:56 +0100)
errno is essentially random at this point.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xenstore/xenstored_watch.c

index 16d30899d47f90cf457bcd89701890afa2f14843..65d4025239e0379e8f4e59907d6a4495fab7a217 100644 (file)
@@ -134,7 +134,7 @@ void do_watch(struct connection *conn, struct buffered_data *in)
                relative = !strstarts(vec[0], "/");
                vec[0] = canonicalize(conn, vec[0]);
                if (!is_valid_nodename(vec[0])) {
-                       send_error(conn, errno);
+                       send_error(conn, EINVAL);
                        return;
                }
        }