[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/8] Add core.sh and wrapper function



On 04/14/2015 02:55 PM, Ian Campbell wrote:
> On Mon, 2015-04-13 at 17:13 +0100, Stefano Stabellini wrote:
>> I think it might be OK to have something like 5) just for the command
>> line parsing in raise, for the sake of giving more flexibility to the
>> user. Also it would be confined to one specific call site. But I am
>> uncertain that the pros outweigh the cons in this case.
> 
> I've only glanced at it, but isn't this largely replicating getopt(1)?
> Perhaps without requiring -- on the options, but having the -- is more
> conventional I think.

For the top-level command-line parsing, yeah, I wouldn't think
introducing that crazy macro would be worth it; doing getopt just the
one time is probably worth it.

For the internal calling convention, setting up getopt at the top fo
every single function would be a nightmare.  I have been using the
$arg_parse calling convention in my own script library for several years
now, and believe me, it is a *lot* nicer.

 -George

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.