block/hmp: Allow node-name in 'info block'

The optional parameter specifying a block device allows now to use a
node-name instead of a drive name (and therefore to inspect any node in
the graph). The new -n options allows listing all named nodes instead of
BlockBackends.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2014-09-15 12:19:14 +02:00
parent 8d6adccda2
commit e6bb31ec6f
2 changed files with 33 additions and 4 deletions

View file

@ -2628,10 +2628,10 @@ static mon_cmd_t info_cmds[] = {
},
{
.name = "block",
.args_type = "verbose:-v,device:B?",
.params = "[-v] [device]",
.args_type = "nodes:-n,verbose:-v,device:B?",
.params = "[-n] [-v] [device]",
.help = "show info of one block device or all block devices "
"(and details of images with -v option)",
"(-n: show named nodes; -v: show details)",
.mhandler.cmd = hmp_info_block,
},
{