Loading hw/qdev.c +14 −9 Original line number Diff line number Diff line Loading @@ -767,7 +767,7 @@ static void device_unparent(Object *obj) DeviceClass *dc = DEVICE_GET_CLASS(dev); BusState *bus; QObject *event_data; gchar *path = object_get_canonical_path(obj); bool have_realized = dev->realized; while (dev->num_child_bus) { bus = QLIST_FIRST(&dev->child_bus); Loading @@ -787,6 +787,10 @@ static void device_unparent(Object *obj) dev->parent_bus = NULL; } /* Only send event if the device had been completely realized */ if (have_realized) { gchar *path = object_get_canonical_path(OBJECT(dev)); if (dev->id) { event_data = qobject_from_jsonf("{ 'device': %s, 'path': %s }", dev->id, path); Loading @@ -797,6 +801,7 @@ static void device_unparent(Object *obj) qobject_decref(event_data); g_free(path); } } static void device_class_init(ObjectClass *class, void *data) { Loading Loading
hw/qdev.c +14 −9 Original line number Diff line number Diff line Loading @@ -767,7 +767,7 @@ static void device_unparent(Object *obj) DeviceClass *dc = DEVICE_GET_CLASS(dev); BusState *bus; QObject *event_data; gchar *path = object_get_canonical_path(obj); bool have_realized = dev->realized; while (dev->num_child_bus) { bus = QLIST_FIRST(&dev->child_bus); Loading @@ -787,6 +787,10 @@ static void device_unparent(Object *obj) dev->parent_bus = NULL; } /* Only send event if the device had been completely realized */ if (have_realized) { gchar *path = object_get_canonical_path(OBJECT(dev)); if (dev->id) { event_data = qobject_from_jsonf("{ 'device': %s, 'path': %s }", dev->id, path); Loading @@ -797,6 +801,7 @@ static void device_unparent(Object *obj) qobject_decref(event_data); g_free(path); } } static void device_class_init(ObjectClass *class, void *data) { Loading