From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: [Xen-devel] [PATCH v2 3/3] xenstore: remove not applicable control commands in stubdom
Date: Wed, 12 Feb 2020 08:41:54 +0100 [thread overview]
Message-ID: <20200212074154.23755-4-jgross@suse.com> (raw)
In-Reply-To: <20200212074154.23755-1-jgross@suse.com>
When run in a stubdom environment Xenstore can't select a logfile or
emit memory statistics to a specific file.
So remove or modify those control commands accordingly.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
tools/xenstore/xenstored_control.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tools/xenstore/xenstored_control.c b/tools/xenstore/xenstored_control.c
index e4b8aa95ab..8d48ab4820 100644
--- a/tools/xenstore/xenstored_control.c
+++ b/tools/xenstore/xenstored_control.c
@@ -61,6 +61,19 @@ static int do_control_log(void *ctx, struct connection *conn,
return 0;
}
+#ifdef __MINIOS__
+static int do_control_memreport(void *ctx, struct connection *conn,
+ char **vec, int num)
+{
+ if (num)
+ return EINVAL;
+
+ talloc_report_full(NULL, stdout);
+
+ send_ack(conn, XS_CONTROL);
+ return 0;
+}
+#else
static int do_control_logfile(void *ctx, struct connection *conn,
char **vec, int num)
{
@@ -114,6 +127,7 @@ static int do_control_memreport(void *ctx, struct connection *conn,
send_ack(conn, XS_CONTROL);
return 0;
}
+#endif
static int do_control_print(void *ctx, struct connection *conn,
char **vec, int num)
@@ -132,8 +146,12 @@ static int do_control_help(void *, struct connection *, char **, int);
static struct cmd_s cmds[] = {
{ "check", do_control_check, "" },
{ "log", do_control_log, "on|off" },
+#ifdef __MINIOS__
+ { "memreport", do_control_memreport, "" },
+#else
{ "logfile", do_control_logfile, "<file>" },
{ "memreport", do_control_memreport, "[<file>]" },
+#endif
{ "print", do_control_print, "<string>" },
{ "help", do_control_help, "" },
};
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-02-12 7:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 7:41 [Xen-devel] [PATCH v2 0/3] tools/xenstore Juergen Gross
2020-02-12 7:41 ` [Xen-devel] [PATCH v2 1/3] xenstore: setup xenstore stubdom console interface properly Juergen Gross
2020-02-13 12:01 ` Wei Liu
2020-02-12 7:41 ` [Xen-devel] [PATCH v2 2/3] xenstore: add console xenstore entries for xenstore stubdom Juergen Gross
2020-02-13 12:03 ` Wei Liu
2020-02-12 7:41 ` Juergen Gross [this message]
2020-02-13 12:04 ` [Xen-devel] [PATCH v2 3/3] xenstore: remove not applicable control commands in stubdom Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200212074154.23755-4-jgross@suse.com \
--to=jgross@suse.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).