*/
bool xs_is_domain_introduced(struct xs_handle *h, unsigned int domid);
-/* Only useful for DEBUG versions */
+char *xs_control_command(struct xs_handle *h, const char *cmd,
+ void *data, unsigned int len);
+/* Deprecated: use xs_control_command() instead. */
char *xs_debug_command(struct xs_handle *h, const char *cmd,
void *data, unsigned int len);
return 0;
}
-static int do_debug(struct connection *conn, struct buffered_data *in)
+static int do_control(struct connection *conn, struct buffered_data *in)
{
int num;
if (streq(in->buffer, "print")) {
if (num < 2)
return EINVAL;
- xprintf("debug: %s", in->buffer + get_string(in, 0));
+ xprintf("control: %s", in->buffer + get_string(in, 0));
}
if (streq(in->buffer, "check"))
check_store();
- send_ack(conn, XS_DEBUG);
+ send_ack(conn, XS_CONTROL);
return 0;
}
const char *str;
int (*func)(struct connection *conn, struct buffered_data *in);
} const wire_funcs[XS_TYPE_COUNT] = {
- [XS_DEBUG] = { "DEBUG", do_debug },
+ [XS_CONTROL] = { "CONTROL", do_control },
[XS_DIRECTORY] = { "DIRECTORY", send_directory },
[XS_READ] = { "READ", do_read },
[XS_GET_PERMS] = { "GET_PERMS", do_get_perms },
return port;
}
-/* Only useful for DEBUG versions */
-char *xs_debug_command(struct xs_handle *h, const char *cmd,
- void *data, unsigned int len)
+char *xs_control_command(struct xs_handle *h, const char *cmd,
+ void *data, unsigned int len)
{
struct iovec iov[2];
iov[1].iov_base = data;
iov[1].iov_len = len;
- return xs_talkv(h, XBT_NULL, XS_DEBUG, iov,
+ return xs_talkv(h, XBT_NULL, XS_CONTROL, iov,
ARRAY_SIZE(iov), NULL);
}
+char *xs_debug_command(struct xs_handle *h, const char *cmd,
+ void *data, unsigned int len)
+{
+ return xs_control_command(h, cmd, data, len);
+}
+
static int read_message(struct xs_handle *h, int nonblocking)
{
/* IMPORTANT: It is forbidden to call this function without
enum xsd_sockmsg_type
{
- XS_DEBUG,
+ XS_CONTROL,
+#define XS_DEBUG XS_CONTROL
XS_DIRECTORY,
XS_READ,
XS_GET_PERMS,