dm_test: improve the appearance shown by "dm tree" command
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Sat, 29 Nov 2014 08:01:56 +0000 (17:01 +0900)
committerSimon Glass <sjg@chromium.org>
Thu, 11 Dec 2014 20:18:41 +0000 (13:18 -0700)
commita56642c7baa02ec4f054d630ec4e5e56d8e087da
treebc25341e6fb74cdd42ed1ac3ffa6476f9a54084f
parent80d9ef8d40b2aa35c4a3483f5cf3549215187a7c
dm_test: improve the appearance shown by "dm tree" command

The command "dm tree" lists devices in a tree-like format.
This commit makes it look more like what the Unix command "tree"
shows.

=> dm tree
 Class       Probed   Name
----------------------------------------
 root        [ + ]    root_driver
 demo        [   ]    |-- demo_shape_drv
 demo        [   ]    |-- demo_simple_drv
 demo        [   ]    |-- demo_shape_drv
 demo        [   ]    |-- demo_simple_drv
 demo        [   ]    |-- demo_shape_drv
 test        [   ]    |-- test_drv
 test        [   ]    |-- test_drv
 test        [   ]    |-- test_drv
 gpio        [   ]    |-- gpio_sandbox
 serial      [   ]    |-- serial_sandbox
 serial      [ + ]    |-- serial
 demo        [   ]    |-- triangle
 demo        [   ]    |-- square
 demo        [   ]    |-- hexagon
 gpio        [   ]    |-- gpios
 spi         [   ]    |-- spi@0
 spi_emul    [   ]    |   `-- flash@0
 cros_ec     [ + ]    `-- cros-ec@0

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
test/dm/cmd_dm.c