[xen master] xl: add --clear option to dmesg command

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] xl: add --clear option to dmesg command

patchbot
commit 32e7db7f6fbb91dac1e4e1bbcab4851c4606e0fa
Author:     xiliang <[hidden email]>
AuthorDate: Tue Aug 1 23:57:50 2017 +0800
Commit:     Wei Liu <[hidden email]>
CommitDate: Fri Aug 4 15:36:29 2017 +0100

    xl: add --clear option to dmesg command
   
    The manual of xl says --clear option is supported and that option
    worked for xm. Add that to xl now.
   
    Signed-off-by: Xiao Liang <[hidden email]>
    Acked-by: Wei Liu <[hidden email]>
---
 tools/xl/xl_info.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c
index 94bd1fd..e9890ca 100644
--- a/tools/xl/xl_info.c
+++ b/tools/xl/xl_info.c
@@ -884,8 +884,12 @@ int main_dmesg(int argc, char **argv)
     libxl_xen_console_reader *cr;
     char *line;
     int opt, ret = 1;
+    static struct option opts[] = {
+        {"clear", 0, 0, 'c'},
+        COMMON_LONG_OPTS
+    };
 
-    SWITCH_FOREACH_OPT(opt, "c", NULL, "dmesg", 0) {
+    SWITCH_FOREACH_OPT(opt, "c", opts, "dmesg", 0) {
     case 'c':
         clear = 1;
         break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog