From: Ian Jackson Subject: Re: Bug fix patch of libxl Date: Thu, 19 Aug 2010 17:15:35 +0100 Message-ID: <19565.22695.52990.262996@mariner.uk.xensource.com> References: <433DDF91DFB08148BAD3FDB6FDDA314C8CA46EC864@LONPMAILBOX01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <433DDF91DFB08148BAD3FDB6FDDA314C8CA46EC864@LONPMAILBOX01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jun Zhu (Intern)" Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Jun Zhu (Intern) writes ("[Xen-devel] Bug fix patch of libxl"): > A small bug in libxl. Fixed in attatched patch. Thanks for the report and the patch. I'm not entirely convinced about your fix, however. Firstly, this is only one of many callers of is_hvm. Secondly, the error logging should probably be in is_hvm, not in the caller. Thirdly I think replacing the if() with a switch makes matters much less clear; it would be better to do hvm = is_hvm(...); if (hvm<0) return hvm; if (hvm) { .... or some such. And fourthly when you submit a patch you should just delete the old code from the file, not comment it out. Our version control system will let us retrieve the old version if we want to read it. This is probably all a bit much so I'll see if I can do a better fix. Regards, Ian.