At 2012/5/9 21:25, Dave Anderson Wrote:
----- Original Message -----
> Hello HATAYAMA,
>
> I am trying to add a new command can be used to display rbtree and
> radix tree. After some investigation, I find they are similar to the
> build-in command "list". So I send this mail to ask your opinion about
> making cmd_list to be similar to the command "struct/union/*".
Having radix_tree and rbtree enumerators is a good idea.
But before you get started, please do *not* pollute the cmd_list()
function with these two facilities. Make it a separate command
("tree" perhaps?) that can branch and handle the two different
tree types.
It would also be helpful if the interfaces could be made available for
use by other commands, i.e., similar to the way that the "irq" command
uses the do_radix_tree() function in filesys.c, or the way that do_list()
is used by cmd_list(), but is also available as a general purpose function
for other commands.
Hmm, the interfaces is made available for use by other commands,
do you mean that the new command(tree?) can be a built-in command?
Thanks
Wen Congyang
Dave
>
> Another thing needed to be inquired is about the style of displaying
> tree. I will list some of my thought, and some suggestion will be
> glad
> to get from you.
>
> 1.
> NODE ... : ...
> NODE ... : ...
> NODE ... : ...
> NODE ... : ...
> NODE ... : ...
> NODE ... : ...
>
> This style can not indicate whether the leaf is left or right. And
> with
> a big depth, the output may be ugly. So I do not like it.
>
> 2.
> l - left child
> r - right child
>
> root NODE ... : ...
> l NODE ... : ...
> ll NODE ... : ...
> lll NODE ... : ...
> lr NODE ... : ...
> r NODE ... : ...
>
> Of course, in radix tree, l& r will be changed to some string that
> can
> indicate the child of a node. Still, with a big depth, the line will
> be
> too long and ugly.
>
> 3.
> root NODE addr1 : ...
> addr1 l NODE addr2 : ...
> addr2 l NODE addr3 : ...
> addr3 l NODE addr4 : ...
> addr2 r NODE addr5 : ...
> addr1 r NODE addr6 : ...
>
> (l& r have the same meaning with the one in the 2.)
>
> Surely, I prefer the the third one. What do you think? Or eliminating
> the information indicating position is acceptable?
>
> --
> --
> Regards
> Qiao Nuohan
>
>
>
> --
> Crash-utility mailing list
> Crash-utility(a)redhat.com
>
https://www.redhat.com/mailman/listinfo/crash-utility
>
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility