[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xenstore: remove not applicable control commands in stubdom



commit 1fb9a8bd8c7158eed26acb5ecd3210b82f1c31d4
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Wed Feb 12 08:41:54 2020 +0100
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Thu Feb 13 12:59:43 2020 +0000

    xenstore: remove not applicable control commands in stubdom
    
    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@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 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, "" },
 };
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.