diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-03-24 08:11:58 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-03-24 08:11:58 -0500 |
commit | 56d7a964a5664d3778a0b7a369a5f350d0fe099f (patch) | |
tree | a851ba09087f5291d2c412981efd6605118a9142 /hw/qdev-properties.c | |
parent | 24e838b787959eba0bc516d36224df2c6855d02a (diff) | |
parent | 2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6 (diff) | |
download | hqemu-56d7a964a5664d3778a0b7a369a5f350d0fe099f.zip hqemu-56d7a964a5664d3778a0b7a369a5f350d0fe099f.tar.gz |
Merge remote branch 'amit/for-anthony' into staging
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r-- | hw/qdev-properties.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index a45b61e..1088a26 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -351,8 +351,13 @@ static int parse_chr(DeviceState *dev, Property *prop, const char *str) CharDriverState **ptr = qdev_get_prop_ptr(dev, prop); *ptr = qemu_chr_find(str); - if (*ptr == NULL) + if (*ptr == NULL) { return -ENOENT; + } + if ((*ptr)->assigned) { + return -EEXIST; + } + (*ptr)->assigned = 1; return 0; } |