mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
qemu/qdev: type safety in reset handler
Add type safety to qdev reset handlers, by declaring them as DeviceState * rather than void *. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
committed by
Anthony Liguori
parent
ac0be99800
commit
7f23f812c4
@@ -115,6 +115,7 @@ BusState *qdev_get_child_bus(DeviceState *dev, const char *name);
|
||||
|
||||
typedef int (*qdev_initfn)(DeviceState *dev, DeviceInfo *info);
|
||||
typedef int (*qdev_event)(DeviceState *dev);
|
||||
typedef void (*qdev_resetfn)(DeviceState *dev);
|
||||
|
||||
struct DeviceInfo {
|
||||
const char *name;
|
||||
@@ -125,7 +126,7 @@ struct DeviceInfo {
|
||||
int no_user;
|
||||
|
||||
/* callbacks */
|
||||
QEMUResetHandler *reset;
|
||||
qdev_resetfn reset;
|
||||
|
||||
/* device state */
|
||||
const VMStateDescription *vmsd;
|
||||
|
||||
Reference in New Issue
Block a user