[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 Tue, 2015-04-14 at 15:44 +0100, George Dunlap wrote:
> 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.

Right, that's why I trimmed all but the bit where Stefano talked about
the raise command line, sorry for not making it clearer why I'd done
that in my comment.

I've no particular opinion on the internal calling convention used
within the shell functions.

Ian.



_______________________________________________
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®.