From: xiliang Date: Tue, 1 Aug 2017 15:57:50 +0000 (+0800) Subject: xl: add --clear option to dmesg command X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1720 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=32e7db7f6fbb91dac1e4e1bbcab4851c4606e0fa;p=xen.git 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 Acked-by: Wei Liu --- diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c index 94bd1fd9ab..e9890ca5f2 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;