Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
xen.23721
xs-23-XS_DEBUG-rename.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xs-23-XS_DEBUG-rename.patch of Package xen.23721
commit f88d7aded87307e41700c7f21ae17375b846c265 Author: Juergen Gross <jgross@suse.com> Date: Fri Feb 24 07:21:40 2017 +0100 xenstore: rename XS_DEBUG wire command In preparation to support other than pure debug functionality via the Xenstore XS_DEBUG wire command rename it to XS_CONTROL and make XS_DEBUG an alias of it. Add an alias xs_control_command for the associated xs_debug_command, too. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Index: xen-4.7.2-testing/tools/xenstore/include/xenstore.h =================================================================== --- xen-4.7.2-testing.orig/tools/xenstore/include/xenstore.h +++ xen-4.7.2-testing/tools/xenstore/include/xenstore.h @@ -271,7 +271,9 @@ bool xs_path_is_subpath(const char *pare */ 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); Index: xen-4.7.2-testing/tools/xenstore/xenstored_core.c =================================================================== --- xen-4.7.2-testing.orig/tools/xenstore/xenstored_core.c +++ xen-4.7.2-testing/tools/xenstore/xenstored_core.c @@ -1282,7 +1282,7 @@ static int do_set_perms(struct connectio 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; @@ -1294,13 +1294,13 @@ static int do_debug(struct connection *c 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; } @@ -1309,7 +1309,7 @@ static struct { 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 }, Index: xen-4.7.2-testing/tools/xenstore/xs.c =================================================================== --- xen-4.7.2-testing.orig/tools/xenstore/xs.c +++ xen-4.7.2-testing/tools/xenstore/xs.c @@ -1109,9 +1109,8 @@ out: 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]; @@ -1120,10 +1119,16 @@ char *xs_debug_command(struct xs_handle 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 Index: xen-4.7.2-testing/xen/include/public/io/xs_wire.h =================================================================== --- xen-4.7.2-testing.orig/xen/include/public/io/xs_wire.h +++ xen-4.7.2-testing/xen/include/public/io/xs_wire.h @@ -28,7 +28,8 @@ enum xsd_sockmsg_type { - XS_DEBUG, + XS_CONTROL, +#define XS_DEBUG XS_CONTROL XS_DIRECTORY, XS_READ, XS_GET_PERMS,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor