From: Ian Jackson Subject: Re: [PATCH v2 5/5] libxl, hvmloader: Don't relocate memory for MMIO hole Date: Thu, 20 Jun 2013 14:35:12 +0100 Message-ID: <20931.1296.327999.375066@mariner.uk.xensource.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51C2E126.4090304@eu.citrix.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: George Dunlap Cc: Ian Campbell , Hanweidong , Stefano Stabellini , xen-devel@lists.xen.org, Stefano Stabellini , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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. If someone wants to add xs_read_bool or something which checks for "0" and "1" and throws an error if it reads something else, then fine. But not in this patch series and not for 4.3, obviously. Ian.