From: Ian Jackson Subject: [PATCH] xl: Die on unknown options Date: Fri, 23 Oct 2015 16:44:11 +0100 Message-ID: <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: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Ian Jackson , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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