From: Wei Liu Subject: Re: [PATCH] xl: Die on unknown options Date: Mon, 26 Oct 2015 10:52:48 +0000 Message-ID: <20151026105248.GR5060@zion.uk.xensource.com> References: <1445615051-23802-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1445615051-23802-1-git-send-email-ian.jackson@eu.citrix.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.xensource.com, Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Fri, Oct 23, 2015 at 04:44:11PM +0100, Ian Jackson wrote: > def_getopt would print a message to stderr, but blunder on anyway. > > Sadly this is probably not a backport candidate. > > Signed-off-by: Ian Jackson Acked-by: Wei Liu > --- > tools/libxl/xl_cmdimpl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index ea43761..de28593 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -2759,6 +2759,7 @@ static int def_getopt(int argc, char * const argv[], > exit(0); > } > fprintf(stderr, "option `%c' not supported.\n", optopt); > + exit(2); > } > if (opt == 'h') { > help(helpstr); > -- > 1.7.10.4