History | View | Annotate | Download (19.8 kB)
qdev-monitor: Avoid qdev as variable name
Prepares for bringing error cleanup code into canonical QOM form.
Includes a whitespace removal after curly brace by Stefan.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Igor Mammedov <imammedo@redhat.com>...
qdev-monitor: Inline qdev_init() for device_add
For historic reasons, qdev_init() unparents the device on failure.Inline this to make the error paths clearer and consistent.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Drop misleading qdev_free() function
The qdev_free() function name is misleading since all the function doesis unlink the device from its parent. The device is not necessarilyfreed.
The device will be freed when its QObject refcount reaches zero. It is...
qdev-monitor: Unref device when device_add fails
qdev_device_add() leaks the created device upon failure. I suspect thisproblem crept in because qdev_free() unparents the device but does notdrop a reference - confusing name.
Cc: qemu-stable@nongnu.org...
qdev-monitor: Clean up qdev_device_add() variable naming
Avoid confusion between object (obj) and object class (oc).Tidy DeviceClass variable while at it (k -> dc).
Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev-monitor: Fix crash when device_add is called with abstract driver
User is able to crash running QEMU when following monitorcommand is called:
device_add intel-hda-generic
Crash is caused by assertion in object_initialize_with_type()when type is abstract....
Mostly revert "qemu-help: Sort devices by logical functionality"
This reverts most of commit 3d1237fb2ab4edb926c717767bb5e31d6053a7c5.
The commit claims to sort the output of "-device help" "byfunctionality rather than alphabetical". Issues:
qdev-monitor: Group "device_add help" and "info qdm" by category
Output is a long, unsorted list. Not very helpful. Print one listper device category instead, with a header line identifying thecategory, plus a list of uncategorized devices. Print each list in...
qemu-help: Sort devices by logical functionality
Categorize devices that appear as output to "-device ?" commandby logical functionality. Sort the devices by logical categoriesbefore showing them to user.
The sort is done by functionality rather than alphabetical....
misc: Use g_assert_not_reached for code which is expected to be unreachable
The macro g_assert_not_reached is a better self documenting replacementfor assert(0) or assert(false).
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qdev: Let qdev_prop_parse() pass through Error
Move error reporting to callers.
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qbus: remove wrong error messages
The existing code shows the "Bus '%s' is full" message even if nameis specified and different from bus->name (i.e. match=0).
The patch excludes unnecessary error message.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
qdev: Fix device_add bus assumptions
Drop an unreachable fallback bus assignment to SysBus.
If no ,bus= is specified, only search busses recursively for bus type ifthe DeviceClass has a bus_type specified. Handle resulting NULL cases.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
hw: move qdev-monitor.o to toplevel directory
qdev-monitor.c is the only "core qdev" file that is not used inuser-mode emulation, and it does not define anything that is usedby hardware models. Remove it from the hw/ directory andremove hw/qdev-monitor.h from hw/qdev.h too; this requires...