[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 5/5] libxl, hvmloader: Don't relocate memory for MMIO hole

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.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.