Re: Device Registry (DevReg) Patch 0.2.0

From: Tim Jansen (tim@tjansen.de)
Date: Tue Apr 24 2001 - 13:27:07 EST


On Tuesday 24 April 2001 18:39, Martin Dalecki wrote:
> Are there alternatives to get complex and extendable information out to
> user space?
> Yes filesystem structures.

How exactly can this work? A single value per file is not very helpful if you
have a thousand values. You could cluster them (for example one level in the
XML hierarchy == one file), but this will soon get very complicated. Its much
more work to implement in the kernel, its painful in user-space and you cant
just use a text editor to look at it (because you always have to look at 10
files per device).
IMHO only a single XML file per physical device is an option, but I do not
know how to name the files...

> Or just simple parsing in the user space plain binary data.

This would be a compatibility nightmare and hard to maintain. Once you
decided for a binary format you cannot change or extend it without breaking
user-space apps. This may save a few lines code, but not many. All you need
to add a line to XML output is a sprintf and a call to devreg_write_line().

One of the ideas of devreg is that while it has a common format for generic
information, like the name and topology of physical devices, every driver can
add additional data (this is why XML namespaces are used). Currently only the
USB and PCI subsystems add data to devreg, but in future versions the device
driver itself or other subsystems should do this, too.

bye...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Apr 30 2001 - 21:00:12 EST