Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 1997 12:28:49 +0200
From:      Poul-Henning Kamp <phk@dk.tfs.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        Stefan Esser <se@FreeBSD.ORG>, Michael Smith <msmith@atrad.adelaide.edu.au>, current@FreeBSD.ORG
Subject:   Re: Backwards compatibiliy for isa_driver 
Message-ID:  <3857.863692129@critter>
In-Reply-To: Your message of "Thu, 15 May 1997 10:07:18 BST." <Pine.BSF.3.95q.970515090922.22139I-100000@herring.nlsystems.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> 
>> 1) define a database that supports all types of devices and buses
>> 
>> 2) use "methods" to access the data without knowledge about the actual forma
>t

I actually have built a general registry for FreeBSD two times.
First one died because it was a mess at run time, Second one because
I had chosen option 1) above.

Here is my intended design next time I attempt this:

1. A node can contain a value and/or be the parent of other nodes.

2. The identity of a node is a string consisting of names separated
   by ".".  the names must be valid C identifiers.

3. The type of a value is identified with a pointer to a method
   implementation, which provides the following methods:
	
	ascii2native(...)
	native2ascii(...)
	lookup(...)
	getnext(...)
	...

4. All nodes are marked either "pinned" or "pageable"

5. A "getnext" operator along the lines of SNMP can traverse the
   tree.

..and by this time I usually give stop and realize that this looks a
hell of a lot like a filesystem and decide that I should probably
implement it to look like a filesystem from userland...

The important properties seen from my point of view is:

1.  It should be possible to edit the registry at the same time in
    this boot process where we have userconfig today.

2.  All values must have an ascii representation (if nothing else
    as a hex dump.

3.  nodes must be pinnable, so that the lower part can use them too.

4.  traversing the tree must be possible.

5.  A compact and efficient way of declaring nodes in the source
    must exist (better than current sysctl if possible)

And no, I don't have the time :-(

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@tfs.com           TRW Financial Systems, Inc.
Power and ignorance is a disgusting cocktail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3857.863692129>