Re: Printing the device tree

On Jan 9, 2010, at 5:26 PM, David Young wrote:
> On Fri, Jan 08, 2010 at 11:56:59PM +0100, Joerg Sonnenberger wrote:
>> Hi all,
>> someone asked a while ago for a script to print the device tree in a
>> nicely formatted fashion. Attached is a script to either draw some ASCII
>> art or produce dot output for graphviz (with -d). Comments?
>
> I like it. How about printing a device subtree when the caller provides
> an optional argument, the name of the root of the tree?
>
> Dave
>
> --
> David Young OJC Technologies
> dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933
>
I tried it with dot output on two of my machines. On both, dot objected to the
second line: "syntax error". Here's the start of the output:
digraph "Device tree" {
-> mainbus0
mainbus0 -> cpu0
mainbus0 -> cpu1
mainbus0 -> ioapic0
--Steve Bellovin, http://www.cs.columbia.edu/~smb