From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH v2 5/5] libxl, hvmloader: Don't relocate memory for MMIO hole Date: Thu, 20 Jun 2013 15:06:01 +0100 Message-ID: <51C30C49.4080206@eu.citrix.com> References: <1371573984-28514-1-git-send-email-george.dunlap@eu.citrix.com> <1371573984-28514-5-git-send-email-george.dunlap@eu.citrix.com> <51C2C9E0.6060006@eu.citrix.com> <51C2F1A502000078000DF4B7@nat28.tlf.novell.com> <51C2D77D.90103@eu.citrix.com> <51C2E126.4090304@eu.citrix.com> <20931.1296.327999.375066@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20931.1296.327999.375066@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Ian Campbell , Hanweidong , Stefano Stabellini , xen-devel@lists.xen.org, Stefano Stabellini , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 20/06/13 14:35, Ian Jackson wrote: > George Dunlap writes ("Re: [Xen-devel] [PATCH v2 5/5] libxl, hvmloader: Don't relocate memory for MMIO hole"): >> I think I'd be more inclined to do allow_memory_relocate = strcmp(s, >> "0"); That will have more predictable results (e.g., 0 is false, >> anything else at all is true). > This is a real bikeshed issue, but: > > IMO the strtoll is fine and is superior to strcmp(), direct string > inspection, etc. If we are representing booleans as integers written > out in ASCII, we should be using an integer parsing function, not > cooking up our own half-arsed not-quite-integer parser. Right -- so I'll paint the bike shed "allow_memory_relocate = strtoll()", removing the cast to bool. -George