diff options
author | Amit Shah <amit.shah@redhat.com> | 2011-02-10 12:55:20 +0530 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2011-03-21 16:57:13 +0530 |
commit | 2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6 (patch) | |
tree | c23a1a315307a23e0e97704a06226ed8288e5729 /qemu-char.h | |
parent | f9a90f189c780e066039f2de3906c73c48071bb7 (diff) | |
download | hqemu-2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6.zip hqemu-2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6.tar.gz |
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-char.h b/qemu-char.h index 56d9954..fb96eef 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; }; |