All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xl: Die on unknown options
@ 2015-10-23 15:44 Ian Jackson
  2015-10-26 10:52 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2015-10-23 15:44 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell

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 <Ian.Jackson@eu.citrix.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xl: Die on unknown options
  2015-10-23 15:44 [PATCH] xl: Die on unknown options Ian Jackson
@ 2015-10-26 10:52 ` Wei Liu
  2015-11-03 16:59   ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2015-10-26 10:52 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Wei Liu, Ian Campbell

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 <Ian.Jackson@eu.citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xl: Die on unknown options
  2015-10-26 10:52 ` Wei Liu
@ 2015-11-03 16:59   ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-11-03 16:59 UTC (permalink / raw)
  To: Wei Liu, Ian Jackson; +Cc: xen-devel

On Mon, 2015-10-26 at 10:52 +0000, Wei Liu wrote:
> 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 <Ian.Jackson@eu.citrix.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Applied.

> 
> > ---
> >  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);

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-03 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 15:44 [PATCH] xl: Die on unknown options Ian Jackson
2015-10-26 10:52 ` Wei Liu
2015-11-03 16:59   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.