From: Gianni Tedesco Subject: Re: [PATCH,RFC,v2]: Introduce libxl_domain_create() Date: Tue, 21 Dec 2010 16:15:07 +0000 Message-ID: <1292948108.2899.3.camel@qabil.uk.xensource.com> References: <1292944628.11246.145.camel@qabil.uk.xensource.com> <1292945435.4500.2040.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1292945435.4500.2040.camel@zakaz.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: Ian Campbell Cc: Xen Devel , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Tue, 2010-12-21 at 15:30 +0000, Ian Campbell wrote: > 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. Ah, thanks, missed that. > > + 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. Yes, you're right. > > + > > + 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? Don't think so, seems fine to me. There was something else I was working on that was all already tabs but I don't think it's anything I touched here. > Ian. Thanks Gianni