]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xl: add --clear option to dmesg command
authorxiliang <xiliang@redhat.com>
Tue, 1 Aug 2017 15:57:50 +0000 (23:57 +0800)
committerWei Liu <wei.liu2@citrix.com>
Fri, 4 Aug 2017 14:36:29 +0000 (15:36 +0100)
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 <xiliang@redhat.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xl/xl_info.c

index 94bd1fd9ab003ba995068874adcb1480c1f748dc..e9890ca5f29759991c4d6c81a24bbbc71e284c10 100644 (file)
@@ -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;