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

[Xen-devel] Re: [PATCH,RFC,v2]: Introduce libxl_domain_create()

To: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH,RFC,v2]: Introduce libxl_domain_create()
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Tue, 21 Dec 2010 15:30:35 +0000
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 21 Dec 2010 07:32:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1292944628.11246.145.camel@xxxxxxxxxxxxxxxxxxxxxx>
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: <1292944628.11246.145.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Only minor comments.

On Tue, 2010-12-21 at 15:17 +0000, Gianni Tedesco wrote:
> @@ -246,6 +246,38 @@ enum {
> 
>  #define LIBXL_VERSION 0
> 
> +enum action_on_shutdown {

Namespace.

> +    LIBXL_ACTION_DESTROY,
> +
> +    LIBXL_ACTION_RESTART,
> +    LIBXL_ACTION_RESTART_RENAME,
> +
> +    LIBXL_ACTION_PRESERVE,
> +
> +    LIBXL_ACTION_COREDUMP_DESTROY,
> +    LIBXL_ACTION_COREDUMP_RESTART,
> +};
[...]
> +#define MUST( call ) ({                                                 \
> +        int must_rc = (call);                                           \
> +        if (must_rc < 0) {                                              \
> +            fprintf(stderr,"xl: fatal error: %s:%d, rc=%d: %s\n",       \
> +                    __FILE__,__LINE__, must_rc, #call);                 \
> +            goto error_out;                                             \
> +        }                                                               \
> +    })

I don't think the two callsites of this macro justify the obfuscation of
having a goto in a macro, just open code it.

> +
> +    if ( dom_info->console_autoconnect ) {
> +        cb = autoconnect_console;
> +    }else{

       } else {

> +    }else{

Some of the indentation looks weird. Could be my mail client or perhaps
you are mixing spaces and tabs or something?

Ian.


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

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