char: Allow devices to use a single multiplexed chardev.

This fixes regression caused by commit
2d6c1ef40f
("char: Prevent multiple devices opening same chardev"):

-nodefaults -nographic -chardev stdio,id=stdio,mux=on,signal=off \
 -mon stdio -device virtio-serial-pci \
 -device virtconsole,chardev=stdio -device isa-serial,chardev=stdio

fails with:

qemu-system-x86_64: -device isa-serial,chardev=stdio: Property 'isa-serial.chardev' can't take value 'stdio', it's in use

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
This commit is contained in:
Kusanagi Kouichi 2011-04-26 19:19:26 +09:00 committed by Amit Shah
parent cd8f7df289
commit d5b27167e1
3 changed files with 7 additions and 4 deletions

View file

@ -72,7 +72,7 @@ struct CharDriverState {
char *label;
char *filename;
int opened;
int assigned; /* chardev assigned to a device */
int avail_connections;
QTAILQ_ENTRY(CharDriverState) next;
};