aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-31 17:31:29 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-31 17:31:29 +0000
commit5ccfae10a79e52654c9edc68da6d05f29466b4f9 (patch)
tree6faa930ceea72d80a934a2b3cc876d074ff57479 /monitor.c
parent1490791f614cfc0a80d47d5abd5d359d6b9256c6 (diff)
Implement "info chardev" command. (Gerd Hoffmann)
This patch makes qemu keep track of the character devices in use and implements a "info chardev" monitor command to print a list. qemu_chr_open() sticks the devices into a linked list now. It got a new argument (label), so there is a name for each device. It also assigns a filename to each character device. By default it just copyes the filename passed in. Individual drivers can fill in something else though. qemu_chr_open_pty() sets the filename to name of the pseudo tty allocated. Output looks like this: (qemu) info chardev monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait serial0: filename=unix:/tmp/run.sh-26827/console,server serial1: filename=pty:/dev/pts/5 parallel0: filename=vc:640x480 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5575 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 01a177ade8..61bd33543a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1469,6 +1469,8 @@ static const term_cmd_t info_cmds[] = {
"", "show the version of qemu" },
{ "network", "", do_info_network,
"", "show the network state" },
+ { "chardev", "", qemu_chr_info,
+ "", "show the character devices" },
{ "block", "", do_info_block,
"", "show the block devices" },
{ "blockstats", "", do_info_blockstats,