aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-01-29 19:48:57 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-02-03 12:39:01 -0600
commitff952ba25deb927fea0b30b8a74e0059a47c1ef1 (patch)
tree3920f203e387d4911f1d83345bda8efb70918535 /hw/qdev.h
parent4a2594ddd35de7ae7c8cd9c6828cfe72245e6dc5 (diff)
qdev: Fix exit code for -device ?
Help was shoehorned into device creation, qdev_device_add(). Since help doesn't create a device, it returns NULL, which looks to callers just like failed device creation. Monitor handler do_device_add() doesn't care, but main() exits unsuccessfully. Move help out of device creation, into new qdev_device_help(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 07b9603804..0eb45b0476 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -104,6 +104,7 @@ typedef struct GlobalProperty {
/*** Board API. This should go away once we have a machine config file. ***/
DeviceState *qdev_create(BusState *bus, const char *name);
+int qdev_device_help(QemuOpts *opts);
DeviceState *qdev_device_add(QemuOpts *opts);
int qdev_init(DeviceState *dev) QEMU_WARN_UNUSED_RESULT;
void qdev_init_nofail(DeviceState *dev);