WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 8/9] xl: xl block-attach -N (dry run) option

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 8/9] xl: xl block-attach -N (dry run) option
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 3 Jun 2011 13:09:52 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 03 Jun 2011 05:10:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19944.49615.174611.126833@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>
Organization: Citrix Systems, Inc.
References: <1307037346-31251-1-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-2-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-3-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-4-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-5-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-6-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-7-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-8-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307037346-31251-9-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1307097536.775.361.camel@xxxxxxxxxxxxxxxxxxxxxx> <19944.49615.174611.126833@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-06-03 at 12:13 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH 8/9] xl: xl block-attach -N (dry 
> run) option"):
> > On Thu, 2011-06-02 at 18:55 +0100, Ian Jackson wrote:
> > > -    if ((opt = def_getopt(argc, argv, "", "block-attach", 2)) != -1)
> > > -        return opt;
> > > +    while ((opt = getopt(argc, argv, "Nh")) != -1) {
> > 
> > You've undone part of 23299:39f2942fe56b here, not on purpose?
> 
> The def_getopt only works if the command doesn't have any nonstandard
> options, AFAICT.

I think it does work, the "" above is the nonstandard options
specification e.g. main_console takes -n and -t options:
    while ((opt = def_getopt(argc, argv, "n:t:", "console", 1)) != -1) {
        switch (opt) {
        case 0: case 2:
            return opt;
        case 't':
[...]
            break;
        case 'n':
[...]

>   But if we move -N into the global options this becomes unnecessary.

Yes.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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