From: Ian Campbell Subject: Re: [PATCH,RFC,v2]: Introduce libxl_domain_create() Date: Tue, 21 Dec 2010 15:30:35 +0000 Message-ID: <1292945435.4500.2040.camel@zakaz.uk.xensource.com> References: <1292944628.11246.145.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1292944628.11246.145.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gianni Tedesco Cc: Xen Devel , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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.