[PATCH] OF device tree update (2.5)

Nathan Lynch nathanl at austin.ibm.com
Wed Oct 15 20:06:51 EST 2003

Benjamin Herrenschmidt wrote:
> I don't like _at all_ the way you hijack write() vs. ritev() semantics.
> Especially having write() do something fundamentally different than
> writev().
> I think you either need one single entry taking a "command word"
> followed by the arguments instead, or use 2 different /proc entries
> for adding and deleting nodes. I prefer the command word though as
> it could later be extended to also add/remove individual properties,
> or other actions we may want to provide via this interface.

Ok.  I've removed the writev() callback and taken the "command word"
approach, still with only one file.  The command syntax is:

addition: 'add_node' <path> <name> <length> <value> <name> <length>
<value> ...

removal: 'remove_node' <path>

For example:
# /bin/echo -ne "add_node /foo name 4 foo\000 device_type 4 FOO\000" >
# /bin/echo -n remove_node /foo > /proc/ppc64/ofdt

Hope this is more to everyone's liking :)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: OF_devtree_update.patch
Url: http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20031015/95461c25/attachment.txt 

More information about the Linuxppc64-dev mailing list