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] [PATCH] xl: output illegal option character

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xl: output illegal option character
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Fri, 28 Jan 2011 23:53:03 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 28 Jan 2011 14:53:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19779.896.459909.425993@xxxxxxxxxxxxxxxxxxxxxxxx>
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> <19779.896.459909.425993@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101020 Thunderbird/3.0.9
On 01/28/2011 06:57 PM, Ian Jackson wrote:
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.
What do you think about the attached one? Looks quite obvious to me.

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.
Looking at the two patches I hope I can refactor the option parsing into common code after the release. This should be easier to fix then.


Though illegal characters on xl command lines are catched, the user isn't currently informed which one was not right.
This patch fixes this by printing the faulting character.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>

Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany

Attachment: xl_output_illegal_character.patch
Description: xl_output_illegal_character.patch

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>