diff mbox

[v2] xl: add --clear option to dmesg command

Message ID 20170801155750.22823-1-xiliang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Xiao Liang Aug. 1, 2017, 3:57 p.m. UTC
From: xiliang <xiliang@redhat.com>

The manual of xl says --clear option is supported and that option worked for xm. Add that to xl now.

Signed-off-by: xiliang <xiliang@redhat.com>
---
 tools/xl/xl_info.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Wei Liu Aug. 1, 2017, 4:10 p.m. UTC | #1
On Tue, Aug 01, 2017 at 11:57:50PM +0800, Xiao Liang wrote:
> From: xiliang <xiliang@redhat.com>
> 
> The manual of xl says --clear option is supported and that option worked for xm. Add that to xl now.

I will wrap this long line to 72 columns while committing.

> 
> Signed-off-by: xiliang <xiliang@redhat.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>
Wei Liu Aug. 4, 2017, 10:57 a.m. UTC | #2
On Tue, Aug 01, 2017 at 05:10:27PM +0100, Wei Liu wrote:
> On Tue, Aug 01, 2017 at 11:57:50PM +0800, Xiao Liang wrote:
> > From: xiliang <xiliang@redhat.com>
> > 
> > The manual of xl says --clear option is supported and that option worked for xm. Add that to xl now.
> 
> I will wrap this long line to 72 columns while committing.
> 
> > 
> > Signed-off-by: xiliang <xiliang@redhat.com>

I was about to commit this, but I realised "xiliang" as your name seems
wrong. Should it be "Xi Liang" instead?
Wei Liu Aug. 4, 2017, 11:05 a.m. UTC | #3
On Fri, Aug 04, 2017 at 11:57:53AM +0100, Wei Liu wrote:
> On Tue, Aug 01, 2017 at 05:10:27PM +0100, Wei Liu wrote:
> > On Tue, Aug 01, 2017 at 11:57:50PM +0800, Xiao Liang wrote:
> > > From: xiliang <xiliang@redhat.com>
> > > 
> > > The manual of xl says --clear option is supported and that option worked for xm. Add that to xl now.
> > 
> > I will wrap this long line to 72 columns while committing.
> > 
> > > 
> > > Signed-off-by: xiliang <xiliang@redhat.com>
> 
> I was about to commit this, but I realised "xiliang" as your name seems
> wrong. Should it be "Xi Liang" instead?

I think it should be "Xiao Liang" because that is what is in your email
handle.
Xiao Liang Aug. 4, 2017, 2:34 p.m. UTC | #4
Yes, the full name is "Xiao Liang". Thanks :)

On 08/04/2017 07:05 PM, Wei Liu wrote:
> On Fri, Aug 04, 2017 at 11:57:53AM +0100, Wei Liu wrote:
>> On Tue, Aug 01, 2017 at 05:10:27PM +0100, Wei Liu wrote:
>>> On Tue, Aug 01, 2017 at 11:57:50PM +0800, Xiao Liang wrote:
>>>> From: xiliang <xiliang@redhat.com>
>>>>
>>>> The manual of xl says --clear option is supported and that option worked for xm. Add that to xl now.
>>> I will wrap this long line to 72 columns while committing.
>>>
>>>> Signed-off-by: xiliang <xiliang@redhat.com>
>> I was about to commit this, but I realised "xiliang" as your name seems
>> wrong. Should it be "Xi Liang" instead?
> I think it should be "Xiao Liang" because that is what is in your email
> handle.
Wei Liu Aug. 4, 2017, 2:35 p.m. UTC | #5
On Fri, Aug 04, 2017 at 10:34:18PM +0800, Xiao Liang wrote:
> Yes, the full name is "Xiao Liang". Thanks :)
> 

Cool, thanks for confirming. I will push your patch shortly.
diff mbox

Patch

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;