From: Rusty Russell Subject: Re: [PATCH] Convert shutdown to use xenstore Date: Fri, 05 Aug 2005 12:48:59 +1000 Message-ID: <1123210139.10802.73.camel@localhost.localdomain> References: <200508050258.04875.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200508050258.04875.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson Cc: Dan Smith , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, 2005-08-05 at 02:58 +0100, Mark Williamson wrote: > Hi Dan, > > Any reason not to use textual data in the store rather than numbers? IMO it'd > make it a little more readable - numbers only make sense if you have the > header file - but I don't know if there's a convention on this. If something fundamentally *is* a number, or an ordinal, that's one thing. But otherwise, a simple value is better. We've seen this in sysfs and Open Firmware; the only defence against crap accumulating in the store is constant vigilance. This is only likely if it's actually useful to browse the thing, ie. as consistent and human-readable as possible. This is also an end in itself: something that is self-evident and easy to understand is easier to maintain ("hey, I was using the lower bit of that value to determine if it's read-only, and you broke it!" vs "you removed the field called "read-only"). An ideal system is one where I can implement a new backend, frontend or tool simply by looking at the paths and values in the store. It also has clear implications for diagnosing problems. Cheers, Rusty. -- A bad analogy is like a leaky screwdriver -- Richard Braakman