From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] tools/libx: xl uptime doesn't require argument Date: Thu, 19 Dec 2013 17:04:55 +0000 Message-ID: <52B32737.4000303@linaro.org> References: <1387471503-20794-1-git-send-email-julien.grall@linaro.org> <21171.9437.668231.442440@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vth1w-0001M5-Vs for xen-devel@lists.xenproject.org; Thu, 19 Dec 2013 17:05:03 +0000 Received: by mail-ee0-f42.google.com with SMTP id e53so605070eek.15 for ; Thu, 19 Dec 2013 09:04:59 -0800 (PST) In-Reply-To: <21171.9437.668231.442440@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xenproject.org, ian.campbell@citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 12/19/2013 04:54 PM, Ian Jackson wrote: > Julien Grall writes ("[PATCH] tools/libx: xl uptime doesn't require argument"): >> The current behavior is: >> >> 42sh> xl uptime >> 'xl uptime' requires at least 1 argument. >> >> Usage: xl [-v] uptime [-s] [Domain] >> >> The normal behavior should list uptime for each domain when there is no >> parameters. > > Maybe I'm confused, but the current code seems not to do that even if > you change option parsing spec. Is there part of your patch missing ? No, the last argument of SWITCH_FOREACH_OPT indicates how many argument is required. With this simple patch I can do: 42sh> xl uptime Name ID Uptime Domain-0 0 12:25:52 -- Julien Grall