This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH] xl: fix incorrect display of illegal option char

To: Andre Przywara <andre.przywara@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xl: fix incorrect display of illegal option character
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 28 Jan 2011 17:57:20 +0000
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 28 Jan 2011 09:58:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D42830A.3070104@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D42830A.3070104@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Andre Przywara writes ("[PATCH] xl: fix incorrect display of illegal option 
> according to the getopt(3) manpage (and to my testing) getopt returns 
> '?' if an unknown option character is found and stores the insulting 
> character in optopt.
> This patch fixes the broken output in such a situation:
> Please apply to 4.1.0-rc.

Done, thanks.

> By the way: some command parsers totally omit the faulting character and 
> just output "option not supported."
> Would you still accept a patch which turns all of those occurrences into 
> the upper, more verbose form?

Hrm, I'm not sure.  I guess if the patch is very very obvious.

> Especially as those conditions are not considered fatal and the command 
> execution continues anyway, I found it rather confusing to read an 
> unspecific error message without giving me a clue what I did wrong.

TBH I think it is a bug when unknown options are not fatal.  But
it's probably not sensible to change this now.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>