This adds a QAPI schema for the properties of the dbus-vmstate object.
A list represented as a comma separated string is clearly not very
QAPI-like, but for now just describe the existing interface.
Signed-off-by: Kevin Wolf
---
qapi/qom.json | 18 ++
1 file changed, 18
This adds a QAPI schema for the properties of the pr-manager-helper
object.
Signed-off-by: Kevin Wolf
---
qapi/qom.json | 14 ++
1 file changed, 14 insertions(+)
diff --git a/qapi/qom.json b/qapi/qom.json
index e3357f5123..e7184122e9 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
This adds a QAPI schema for the properties of the throttle-group object.
The only purpose of the x-* properties is to make the nested options in
'limits' available for a command line parser that doesn't support
structs. Any parser that will use the QAPI schema will supports structs,
though, so
This series adds a QAPI type for the properties of all user creatable
QOM types and finally makes the --object command line option (in all
binaries) and the object-add monitor commands (in QMP and HMP) use the
new ObjectOptions union.
This change improves things in more than just one way:
1.
The 'props' option has been deprecated in 5.0 in favour of a flattened
object-add command. Time to change our test cases to drop the deprecated
option.
Signed-off-by: Kevin Wolf
---
tests/qtest/qmp-cmd-test.c | 16 +--
tests/qtest/test-netfilter.c | 54
This adds a QAPI schema for the properties of the authz-* objects.
Signed-off-by: Kevin Wolf
---
qapi/authz.json | 62
qapi/qom.json| 10 +
storage-daemon/qapi/qapi-schema.json | 1 +
3 files changed, 73
The option has been deprecated in QEMU 5.0, remove it.
Signed-off-by: Kevin Wolf
---
qapi/qom.json| 6 +-
docs/system/deprecated.rst | 5 -
docs/system/removed-features.rst | 5 +
qom/qom-qmp-cmds.c | 21 -
4 files
On 24/02/2021 14.11, Daniel P. Berrangé wrote:
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 9 -
docs/system/removed-features.rst | 6
hw/i386/pc.c | 1 -
The same information is available via the 'recording' and 'busy' fields.
Signed-off-by: Daniel P. Berrangé
---
block/dirty-bitmap.c | 38
docs/system/deprecated.rst | 7 -
docs/system/removed-features.rst | 7 +
include/block/dirty-bitmap.h | 1 -
The 'host_device' and 'host_cdrom' drivers must be used instead.
Signed-off-by: Daniel P. Berrangé
---
block/file-posix.c | 17 ++---
docs/system/deprecated.rst | 7 ---
docs/system/removed-features.rst | 7 +++
tests/qemu-iotests/226.out | 10
The newer 'query-cpus-fast' command avoids side effects on the guest
execution. Note that some of the field names are different in the
'query-cpus-fast' command.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 5 -
docs/system/removed-features.rst
On Wed, Feb 24, 2021 at 5:15 PM Daniel P. Berrangé
wrote:
> This only makes sense conceptually when used with listener chardevs.
>
> Signed-off-by: Daniel P. Berrangé
>
Reviewed-by: Marc-André Lureau
---
> chardev/char-socket.c| 12
> docs/system/deprecated.rst
The same data is available in the 'BlockDeviceInfo' struct.
Signed-off-by: Daniel P. Berrangé
---
block/qapi.c | 5 -
docs/system/deprecated.rst | 13 -
docs/system/removed-features.rst | 13 +
qapi/block-core.json | 11
On 2/24/21 3:38 PM, Peter Maydell wrote:
> On Wed, 24 Feb 2021 at 13:21, Daniel P. Berrangé wrote:
>>
>> The following features have been deprecated for well over the 2
>> release cycle we promise
>>
>> ``-usbdevice`` (since 2.10.0)
>> ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
* Kevin Wolf (kw...@redhat.com) wrote:
> This adds a QAPI schema for the properties of the objects implementing
> the confidential-guest-support interface.
>
> pef-guest and s390x-pv-guest don't have any properties, so they only
> need to be added to the ObjectType enum without adding a new
Similarly to the validation for blockdev-add and netdev_add, use the
qemuxml2argv test repository to drive validation of props for
object-add.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvtest.c | 20
1 file changed, 20 insertions(+)
diff --git
Construct the JSON object which is used for object-add without the
'props' wrapper and add the wrapper only in the monitor code.
This simplifies the JSON->commandline generator in the first place and
also prepares for upcoming qemu where 'props' will be removed.
Signed-off-by: Peter Krempa
---
qemu qapified object-add, which means that it's introspectable via
query-qmp-schema. Update the qemu-6.0 capabilities to commit
XX
TODO: update to pushed version
---
.../caps_6.0.0.x86_64.replies | 3238 -
.../caps_6.0.0.x86_64.xml |
There's just one caller left. Since qemuBuildMemoryBackendProps is too
complex to be modified for now, just move the adding of 'id' and 'qom'
type directly into the function.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 6 --
src/qemu/qemu_monitor.c | 15 ---
Libvirt is now prepared for QAPIfied object-add.
Signed-off-by: Peter Krempa
---
tests/qemumonitorjsontest.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 82c74e2ef9..48b41c908a 100644
---
While the 'masterKey0' secret object will never be hotplugged we want to
generate it through JSON so that we'll be able to validate all
parameters of '-object' against the QAPI schema once 'object-add' is
qapified in qemu.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 12
Set 'objectAddNoWrap' when the capability is present.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 121c21be5c..1e4c4809b1 100644
--- a/src/qemu/qemu_monitor.c
+++
QEMU plans to QAPIfy object add. This series prepares for the API change
(drop of 'props' wrapper for the object) and adds testing based on our
qemuxml2argv test data which forces the output to JSON and validates it
agains the schema.
Based on Kevin's qemu patches:
On 24/02/21 14:11, Daniel P. Berrangé wrote:
This was replaced by the '-device usb-DEV' option.
Signed-off-by: Daniel P. Berrangé
This is probably used in many tutorial as "-usbdevice tablet" (for
example https://wiki.gentoo.org/wiki/QEMU/Options).
Paolo
---
docs/system/deprecated.rst
On 24/02/21 14:11, Daniel P. Berrangé wrote:
The following features have been deprecated for well over the 2
release cycle we promise
``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
``-vnc acl`` (since 4.0.0)
``-mon
On Wed, Feb 24, 2021 at 02:36:46PM +0100, Thomas Huth wrote:
> On 24/02/2021 14.11, Daniel P. Berrangé wrote:
> > The VNC ACL concept has been replaced by the pluggable "authz" framework
> > which does not use monitor commands.
> >
> > Reviewed-by: Dr. David Alan Gilbert
> > Signed-off-by:
On 24/02/2021 14.11, Daniel P. Berrangé wrote:
The code comment suggests removing QAPIEvent_(str|lookup) symbols too,
however, these are both auto-generated as standard for any enum in
QAPI. As such it they'll exist whether we use them or not.
Signed-off-by: Daniel P. Berrangé
---
This is a version of user_creatable_process_cmdline() with an Error
parameter that never calls exit() and is therefore usable in HMP.
Signed-off-by: Kevin Wolf
---
include/qom/object_interfaces.h | 16
qom/object_interfaces.c | 29 -
2 files
The implementation for --object can be shared between
qemu-storage-daemon and other binaries, so move it into a function in
qom/object_interfaces.c that is accessible from everywhere.
This also requires moving the implementation of qmp_object_add() into a
new user_creatable_add_qapi(), because
user_creatable_add_opts() has only a single user left, which is a test
case. Rewrite the test to use user_creatable_add_type() instead (which
is the remaining function that doesn't require a QAPI schema) and drop
the QemuOpts related functions.
Signed-off-by: Kevin Wolf
---
On 24/02/2021 14.11, Daniel P. Berrangé wrote:
This was replaced by the '-device usb-DEV' option.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 9 ---
docs/system/removed-features.rst | 9 +++
softmmu/vl.c | 42
This converts object-add from 'gen': false to the ObjectOptions QAPI
type. As an immediate benefit, clients can now use QAPI schema
introspection for user creatable QOM objects.
It is also the first step towards making the QAPI schema the only
external interface for the creation of user creatable
On 2/24/21 12:28 PM, Peng Liang wrote:
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem
This function is now unused and can be removed.
Signed-off-by: Kevin Wolf
---
include/qom/object_interfaces.h | 18 --
qom/object_interfaces.c | 32
2 files changed, 50 deletions(-)
diff --git a/include/qom/object_interfaces.h
The qemu commandline builder's QEMU_BUILD_COMMANDLINE_VALIDATE_KEEP_JSON
flag disables JSON->commandline conversion so that our qemuxml2argvtest
can use the commandline test repostitory for validating our JSON props
generators which are in many cases used on the montitor where we need to
conform
Starting from qemu-6.0 the parameters of -object/object-add are formally
described by the QAPI schema. Additionally this changes the nesting of
the properties as the 'props' nested object will be flattened to the
parent.
We'll need to detect whether qemu switched to this new approach to
generate
While the 'sev0' sev-guest object will never be hotplugged, but we want
to generate it through JSON so that we'll be able to validate all
parameters of '-object' against the QAPI schema once 'object-add' is
qapified in qemu.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c
The commandline generator for 'iothread' objects has a private
implementation of the properties. Convert it to JSON so that it can be
later validated.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git
On a Tuesday in 2021, Laine Stump wrote:
I hadn't caught the code omission because my migration tester system
was out of commission, and I stupidly assumed migration would
work. The docs typo was pure lack of attention.
This (sub) feature will be new for this release, and there is an open
BZ
On Tue, Feb 23, 2021 at 06:36:48PM -0700, Jim Fehlig wrote:
> Signed-off-by: Jim Fehlig
> ---
> NEWS.rst | 17 +
> 1 file changed, 17 insertions(+)
s/NEW/NEWS/ in subject
Reviewed-by: Pavel Hrdina
signature.asc
Description: PGP signature
Hello,
I have been confused by such a phenomenon recently.
Libvirt is the master branch , and the VM is centos8.2(kernel is
4.18.0-193.el8.aarch64).
When I hot-plug the scsi disk for a virtual machine without a virtio-scsi
controller, libvirt will automatically generate an lsilogic controller
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This is only semantically useful for QMP.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> docs/system/deprecated.rst | 7 ---
> docs/system/removed-features.rst | 6 ++
> monitor/monitor.c
On Wed, Feb 24, 2021 at 02:25:46PM +0100, Paolo Bonzini wrote:
> On 24/02/21 14:11, Daniel P. Berrangé wrote:
> > This was replaced by the '-device usb-DEV' option.
> >
> > Signed-off-by: Daniel P. Berrangé
>
> This is probably used in many tutorial as "-usbdevice tablet" (for example
>
On 2/23/21 11:20 AM, Daniel P. Berrangé wrote:
> On Thu, Feb 11, 2021 at 02:44:38PM -0600, Eric Blake wrote:
>> The value '1.1k' is inexact; 1126.4 bytes is not possible, so we
>> happen to truncate it to 1126. Our use of fractional sizes is
>> intended for convenience, but when a user specifies
* Kevin Wolf (kw...@redhat.com) wrote:
> This switches the HMP command object_add from a QemuOpts-based parser to
> user_creatable_add_from_str() which uses a keyval parser and enforces
> the QAPI schema.
>
> Apart from being a cleanup, this makes non-scalar properties and help
> accessible. In
This adds a QAPI schema for the properties of the secret* objects.
The 'loaded' property doesn't seem to make sense as an external
interface: It is automatically set to true in ucc->complete, and
explicitly setting it to true earlier just means that additional options
will be silently ignored.
This adds a QAPI schema for the properties of the filter-* objects.
Some parts of the interface (in particular NetfilterProperties.position)
are very unusual for QAPI, but for now just describe the existing
interface.
net.json can't be included in qom.json because the storage daemon
doesn't have
This adds a QAPI schema for the properties of the can-* objects.
can-bus doesn't have any properties, so it only needs to be added to the
ObjectType enum without adding a new branch to ObjectOptions.
Signed-off-by: Kevin Wolf
---
qapi/qom.json | 18 ++
1 file changed, 18
This adds a QAPI schema for the properties of the colo-compare object.
Signed-off-by: Kevin Wolf
---
qapi/qom.json | 49 +
1 file changed, 49 insertions(+)
diff --git a/qapi/qom.json b/qapi/qom.json
index 4b1cd4b8dc..8e4414f843 100644
---
This adds a QAPI schema for the properties of the tls-* objects.
The 'loaded' property doesn't seem to make sense as an external
interface: It is automatically set to true in ucc->complete, and
explicitly setting it to true earlier just means that additional options
will be silently ignored.
In
This adds a QAPI schema for the properties of the objects implementing
the confidential-guest-support interface.
pef-guest and s390x-pv-guest don't have any properties, so they only
need to be added to the ObjectType enum without adding a new branch to
ObjectOptions.
Signed-off-by: Kevin Wolf
This adds a QAPI schema for the properties of the input-* objects.
ui.json cannot be included in qom.json because the storage daemon can't
use it, so move GrabToggleKeys to common.json.
Signed-off-by: Kevin Wolf
---
qapi/common.json | 12 ++
qapi/qom.json| 58
This adds a QAPI schema for the properties of the rng-* objects.
The 'opened' property doesn't seem to make sense as an external
interface: It is automatically set to true in ucc->complete, and
explicitly setting it to true earlier just means that trying to set
additional options will result in
Add an ObjectOptions union that will eventually describe the options of
all user creatable object types. As unions can't exist without any
branches, also add the first object type.
This adds a QAPI schema for the properties of the iothread object.
Signed-off-by: Kevin Wolf
---
qapi/qom.json |
On 24/02/2021 14.11, Daniel P. Berrangé wrote:
This has been hardcoded to "false" since 2.10.0, since secrets required
to unlock block devices are now always provided upfront instead of using
interactive prompts.
Signed-off-by: Daniel P. Berrangé
---
block/qapi.c | 1 -
The following features have been deprecated for well over the 2
release cycle we promise
``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
``-vnc acl`` (since 4.0.0)
``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)
The code comment suggests removing QAPIEvent_(str|lookup) symbols too,
however, these are both auto-generated as standard for any enum in
QAPI. As such it they'll exist whether we use them or not.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 6 -
This is only semantically useful for QMP.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 7 ---
docs/system/removed-features.rst | 6 ++
monitor/monitor.c| 4 ++--
qemu-options.hx | 5 +++--
4 files changed, 11 insertions(+), 11
The most important bit is that the caller is expected to pass
locked monitor.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_monitor.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index ed35da17e1..73f337a6be 100644
---
On 24/02/2021 14.11, Daniel P. Berrangé wrote:
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives.
Signed-off-by: Daniel P. Berrangé
---
docs/qdev-device-use.txt | 2 +-
docs/system/deprecated.rst | 6 -
docs/system/removed-features.rst | 9
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 9 -
docs/system/removed-features.rst | 6
hw/i386/pc.c | 1 -
hw/scsi/scsi-disk.c | 62
This was replaced by the '-device usb-DEV' option.
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 9 ---
docs/system/removed-features.rst | 9 +++
softmmu/vl.c | 42
3 files changed, 9 insertions(+), 51
This only makes sense conceptually when used with listener chardevs.
Signed-off-by: Daniel P. Berrangé
---
chardev/char-socket.c| 12
docs/system/deprecated.rst | 6 --
docs/system/removed-features.rst | 6 ++
3 files changed, 10 insertions(+), 14
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives.
Signed-off-by: Daniel P. Berrangé
---
docs/qdev-device-use.txt | 2 +-
docs/system/deprecated.rst | 6 -
docs/system/removed-features.rst | 9
hw/i386/pc.c | 1 -
hw/ide/qdev.c
The generic 'migrate_set_parameters' command handle all types of param.
Only the QMP commands were documented in the deprecations page, but the
rationale for deprecating applies equally to HMP, and the replacements
exist. Furthermore the HMP commands are just shims to the QMP commands,
so
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 6 -
docs/system/removed-features.rst | 6 +
hw/core/machine-qmp-cmds.c | 41
qapi/machine.json| 22 -
4 files changed, 6 insertions(+), 69
This has been hardcoded to "false" since 2.10.0, since secrets required
to unlock block devices are now always provided upfront instead of using
interactive prompts.
Signed-off-by: Daniel P. Berrangé
---
block/qapi.c | 1 -
docs/system/deprecated.rst | 10 ---
The VNC ACL concept has been replaced by the pluggable "authz" framework
which does not use monitor commands.
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 16 ---
docs/system/removed-features.rst | 13 +++
hmp-commands.hx
On 24/02/2021 14.11, Daniel P. Berrangé wrote:
The VNC ACL concept has been replaced by the pluggable "authz" framework
which does not use monitor commands.
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Daniel P. Berrangé
---
docs/system/deprecated.rst | 16 ---
This switches qemu-img from a QemuOpts-based parser for --object to
user_creatable_process_cmdline() which uses a keyval parser and enforces
the QAPI schema.
Apart from being a cleanup, this makes non-scalar properties accessible.
Signed-off-by: Kevin Wolf
---
qemu-img.c | 239
This switches qemu-io from a QemuOpts-based parser for --object to
user_creatable_process_cmdline() which uses a keyval parser and enforces
the QAPI schema.
Apart from being a cleanup, this makes non-scalar properties accessible.
Signed-off-by: Kevin Wolf
---
qemu-io.c | 33
This switches the HMP command object_add from a QemuOpts-based parser to
user_creatable_add_from_str() which uses a keyval parser and enforces
the QAPI schema.
Apart from being a cleanup, this makes non-scalar properties and help
accessible. In order for help to be printed to the monitor instead
This adds a QAPI schema for the properties of the memory-backend-*
objects.
HostMemPolicy has to be moved to an include file that can be used by the
storage daemon, too, because ObjectOptions must be the same in all
binaries if we don't want to compile the whole code multiple times.
This QAPIfies --object and ensures that QMP and the command line option
behave the same.
Signed-off-by: Kevin Wolf
---
storage-daemon/qemu-storage-daemon.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/storage-daemon/qemu-storage-daemon.c
This switches qemu-nbd from a QemuOpts-based parser for --object to
user_creatable_process_cmdline() which uses a keyval parser and enforces
the QAPI schema.
Apart from being a cleanup, this makes non-scalar properties accessible.
Signed-off-by: Kevin Wolf
---
qemu-nbd.c | 34
The system emulator has a more complicated way of handling command line
options in that it reorders options before it processes them. This means
that parsing object options and creating the object happen at two
different points. Split the parsing part into a separate function that
can be reused by
This switches the system emulator from a QemuOpts-based parser for
-object to user_creatable_parse_str() which uses a keyval parser and
enforces the QAPI schema.
Apart from being a cleanup, this makes non-scalar properties accessible.
This adopts a similar model as -blockdev uses: When parsing
This code is going away anyway, but for a few more commits, we'll be in
a state where some binaries still use QemuOpts and others don't. If the
"object" QemuOptsList doesn't even exist, we don't have to remove (or
fail to remove, and therefore abort) a user creatable object from it.
This adds a QAPI schema for the properties of the cryptodev-* objects.
These interfaces have some questionable aspects (cryptodev-backend is
really an abstract base class without function, and the queues option
only makes sense for cryptodev-vhost-user), but as the goal is to
represent the
This adds a QAPI schema for the properties of the x-remote-object
object.
Signed-off-by: Kevin Wolf
---
qapi/qom.json | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/qapi/qom.json b/qapi/qom.json
index f8ff322df0..6793342e81 100644
--- a/qapi/qom.json
On Wed, Feb 24, 2021 at 02:58:19PM +0100, Thomas Huth wrote:
> On 24/02/2021 14.11, Daniel P. Berrangé wrote:
> > This was replaced by the '-device usb-DEV' option.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
> > docs/system/deprecated.rst | 9 ---
> >
On Wed, 24 Feb 2021 at 13:21, Daniel P. Berrangé wrote:
>
> The following features have been deprecated for well over the 2
> release cycle we promise
>
> ``-usbdevice`` (since 2.10.0)
> ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
> ``-vnc acl`` (since 4.0.0)
> ``-mon
On Wed, Feb 24, 2021 at 02:38:43PM +, Peter Maydell wrote:
> On Wed, 24 Feb 2021 at 13:21, Daniel P. Berrangé wrote:
> >
> > The following features have been deprecated for well over the 2
> > release cycle we promise
> >
> > ``-usbdevice`` (since 2.10.0)
> > ``-drive
On Wed, Feb 24, 2021 at 09:11:03AM +, xingchaochao wrote:
>
> Hello,
> I have been confused by such a phenomenon recently.
> Libvirt is the master branch , and the VM is centos8.2(kernel is
> 4.18.0-193.el8.aarch64).
> When I hot-plug the scsi disk for a virtual machine without a virtio-scsi
On a Tuesday in 2021, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig
---
NEWS.rst | 17 +
1 file changed, 17 insertions(+)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventually.
Add the missing lock in
x86FeatureNames uses virBuffer and thus can't fail nowadays.
Signed-off-by: Peter Krempa
---
src/cpu/cpu_x86.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 92f945beb4..79c5868ae6 100644
--- a/src/cpu/cpu_x86.c
+++
Get the buffer contents into a temporary variable with automatic
clearing so that the error branches don't have to reset the buffer.
Additionally handle the NULL string case before assignment.
Signed-off-by: Peter Krempa
---
src/util/vircommand.c | 14 +++---
1 file changed, 7
Switch to use g_autoptr for 'doc' and 'new' local variables.
Additionally report proper error when 'xmlAddChild' fails because OOM is
not the only error it can report.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 34 --
1 file changed, 16
'virLogGetFilters' doesn't return failure and 'virLogGetOutputs' reports
it's own errors.
Signed-off-by: Peter Krempa
---
src/lxc/lxc_process.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index cbc04a3dcd..679709605e
The OOM error handling is dead code nowadays.
Signed-off-by: Peter Krempa
---
src/util/vircommand.c | 96 +--
1 file changed, 20 insertions(+), 76 deletions(-)
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index f11caf0d6e..1a4b77ea24 100644
Signed-off-by: Peter Krempa
---
src/util/virxml.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index f73b8975ba..e696dd25f5 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -255,6 +255,7 @@
Signed-off-by: Peter Krempa
---
src/util/virpci.c | 1 -
src/util/virscsi.c | 1 -
src/util/virscsivhost.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 8147ce11e9..3df4199532 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@
Since error checking was removed when switching to g_strdup, it doesn't
make much sense to have 'tmp' around.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/conf/domain_conf.c
'virReportOOMError' is nowadays mostly useless since an OOM error will
trigger yet another allocation failure in the logger when attempting to
log the error.
Additionally it was also used in few places which can fail with other
failures than OOM.
To prevent both errorneous usage types, let's
The function is supposed to always consume the passed environment
variable string. Use a temp variable with autofree and g_steal_pointer
to prevent having to free it manually.
Signed-off-by: Peter Krempa
---
src/util/vircommand.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
The buffer won't encounter OOM condition nowadays
Signed-off-by: Peter Krempa
---
tests/virhostcputest.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/virhostcputest.c b/tests/virhostcputest.c
index 786a363e48..2608f0becc 100644
--- a/tests/virhostcputest.c
+++
The function can't fail nowadays, remove the return value and adjust
callers.
Signed-off-by: Peter Krempa
---
docs/internals/command.html.in | 8 +---
src/util/virfcp.c | 3 +--
src/util/virfile.c | 7 +--
src/util/virfile.h | 2 +-
Trying to report an error on OOM is pointless since error handling
allocates memory.
Signed-off-by: Peter Krempa
---
src/vbox/vbox_common.c | 20
src/vbox/vbox_common.h | 15 +--
2 files changed, 13 insertions(+), 22 deletions(-)
diff --git
If the argument of 'xmlSaveUri' is non-NULL the function returns NULL on
OOM failure only. Thus we can directly abort rather than try to do the
impossible recovery.
Signed-off-by: Peter Krempa
---
src/util/viruri.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git
1 - 100 of 137 matches
Mail list logo