[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 13/15] qdev_device_add(): extend signature with E
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [PATCH v2 13/15] qdev_device_add(): extend signature with Error |
Date: |
Tue, 5 Feb 2013 21:39:26 +0100 |
Signed-off-by: Laszlo Ersek <address@hidden>
---
hw/qdev-monitor.h | 3 ++-
hw/qdev-monitor.c | 4 ++--
vl.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/qdev-monitor.h b/hw/qdev-monitor.h
index 9ec4850..3760bf5 100644
--- a/hw/qdev-monitor.h
+++ b/hw/qdev-monitor.h
@@ -3,6 +3,7 @@
#include "qdev-core.h"
#include "monitor/monitor.h"
+#include "qapi/error.h"
/*** monitor commands ***/
@@ -11,6 +12,6 @@ void do_info_qdm(Monitor *mon, const QDict *qdict);
int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
int do_device_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
int qdev_device_help(QemuOpts *opts);
-DeviceState *qdev_device_add(QemuOpts *opts);
+DeviceState *qdev_device_add(QemuOpts *opts, Error **errp);
#endif
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index 80fc9f8..a7f73dc 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -453,7 +453,7 @@ static BusState *qbus_find(const char *path, Error **errp)
}
}
-DeviceState *qdev_device_add(QemuOpts *opts)
+DeviceState *qdev_device_add(QemuOpts *opts, Error **errp)
{
ObjectClass *obj;
DeviceClass *k;
@@ -666,7 +666,7 @@ int do_device_add(Monitor *mon, const QDict *qdict, QObject
**ret_data)
qemu_opts_del(opts);
return 0;
}
- dev = qdev_device_add(opts);
+ dev = qdev_device_add(opts, NULL);
if (!dev) {
qemu_opts_del(opts);
return -1;
diff --git a/vl.c b/vl.c
index 059e512..1860662 100644
--- a/vl.c
+++ b/vl.c
@@ -2280,7 +2280,7 @@ static int device_init_func(QemuOpts *opts, void *opaque)
{
DeviceState *dev;
- dev = qdev_device_add(opts);
+ dev = qdev_device_add(opts, NULL);
if (!dev)
return -1;
object_unref(OBJECT(dev));
--
1.7.1
- [Qemu-devel] [PATCH v2 06/15] set_property(): extend signature with Error, (continued)
- [Qemu-devel] [PATCH v2 06/15] set_property(): extend signature with Error, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 07/15] set_property(): push error handling to callers, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 12/15] qbus_find(): propagate error handling / consumption to callers, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 11/15] qbus_find(): extend signature with Error, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 15/15] qdev_device_add(): beautify "driver not found" error message, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 09/15] qbus_find_recursive(): extend signature with Error, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 08/15] qbus_find_recursive(): reorganize, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 13/15] qdev_device_add(): extend signature with Error,
Laszlo Ersek <=
- [Qemu-devel] [PATCH v2 14/15] qdev_device_add(): push error handling/consumption to callers, Laszlo Ersek, 2013/02/05
- [Qemu-devel] [PATCH v2 10/15] qbus_find_recursive(): push Error and make it terminate a recursive search, Laszlo Ersek, 2013/02/05
- Re: [Qemu-devel] [PATCH v2 00/15] propagate Errors to do_device_add(), Luiz Capitulino, 2013/02/08