aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.h
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2011-02-10 12:55:20 +0530
committerAmit Shah <amit.shah@redhat.com>2011-03-21 16:57:13 +0530
commit2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6 (patch)
treec23a1a315307a23e0e97704a06226ed8288e5729 /qemu-char.h
parentf9a90f189c780e066039f2de3906c73c48071bb7 (diff)
char: Prevent multiple devices opening same chardev
Prevent: -chardev socket,path=/tmp/foo,server,nowait,id=c0 \ -device virtserialport,chardev=c0,id=vs0 \ -device virtserialport,chardev=c0,id=vs1 Reported-by: Mike Cao <bcao@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'qemu-char.h')
-rw-r--r--qemu-char.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-char.h b/qemu-char.h
index 56d9954c52..fb96eef3de 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -70,6 +70,7 @@ struct CharDriverState {
char *label;
char *filename;
int opened;
+ int assigned; /* chardev assigned to a device */
QTAILQ_ENTRY(CharDriverState) next;
};