libvirt/src/util
Eric Blake 4ea5a41e16 virjson: always raise vir error on append failures
A function that returns -1 for multiple possible failures, but only
raises a libvirt error for some of those failures, can be hard to
use correctly. Yet both of our JSON object/array appenders fall in
that pattern.  True, the silent errors represent coding bugs that
none of the callers should ever trigger, while the noisy errors
represent memory failures that can happen anywhere, so we happened
to never end up failing without an error. But it is better to
either use the _QUIET memory allocation variants, and make callers
decide to report failure; or make all failure paths noisy. This
patch takes the latter approach.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-01-25 09:21:24 -06:00
..
iohelper.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
Makefile.inc.am util: error: Export virErrorMsg for use in testsuite 2018-12-14 13:54:50 +01:00
viralloc.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
viralloc.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virarch.c util: add RISC-V architectures 2018-08-24 13:23:36 +02:00
virarch.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virarptable.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virarptable.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viratomic.c
viratomic.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viraudit.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
viraudit.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virauth.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virauth.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virauthconfig.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virauthconfig.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virbitmap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virbitmap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virbuffer.c Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virbuffer.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
vircgroup.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroup.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupbackend.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupbackend.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgrouppriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv1.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv1.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv2.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircgroupv2.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virclosecallbacks.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virclosecallbacks.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vircommand.c qemu: use line breaks in command line args written to log 2018-12-17 15:02:11 +00:00
vircommand.h qemu: use line breaks in command line args written to log 2018-12-17 15:02:11 +00:00
vircommandpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virconf.c Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virconf.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
vircrypto.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
vircrypto.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdbus.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdbus.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdbuspriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdevmapper.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virdevmapper.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdnsmasq.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virdnsmasq.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virebtables.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virebtables.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virendian.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virerror.c util: fix translation of error message strings 2018-12-17 17:47:30 +00:00
virerror.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virerrorpriv.h util: error: Export virErrorMsg for use in testsuite 2018-12-14 13:54:50 +01:00
virevent.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virevent.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
vireventpoll.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
vireventpoll.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfcp.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virfcp.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfdstream.c src: Make virStr*cpy*() functions return an int 2018-07-23 14:27:30 +02:00
virfdstream.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfile.c util: Introduce xattr getter/setter/remover 2018-12-19 15:31:42 +01:00
virfile.h tests: Introduce qemusecuritytest 2018-12-19 15:32:43 +01:00
virfilecache.c Remove ignore_value or void from unlink calls 2018-09-20 13:45:56 -04:00
virfilecache.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfirewall.c qemu: use line breaks in command line args written to log 2018-12-17 15:02:11 +00:00
virfirewall.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfirewallpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virfirmware.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virfirmware.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virgettext.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
virgettext.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virgic.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virgic.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhash.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virhash.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhashcode.c Use ATTRIBUTE_FALLTHROUGH 2017-06-12 19:11:30 -04:00
virhashcode.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhook.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virhook.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostcpu.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostcpu.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostcpupriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostdev.c util: Fixing invalid error checking from virPCIGetNetname() 2019-01-23 10:21:35 +01:00
virhostdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virhostmem.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virhostmem.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viridentity.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
viridentity.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virinitctl.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virinitctl.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viriptables.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
viriptables.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viriscsi.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
viriscsi.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virjson.c virjson: always raise vir error on append failures 2019-01-25 09:21:24 -06:00
virjson.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkeycode.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virkeycode.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkeyfile.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virkeyfile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkmod.c util: kmod: use VIR_AUTOPTR for aggregate types 2018-07-27 17:21:25 +02:00
virkmod.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virlease.c util: lease: use VIR_AUTOPTR for aggregate types 2018-07-27 17:21:25 +02:00
virlease.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virlockspace.c Revert "virlockspace: Allow caller to specify start and length offset in virLockSpaceAcquireResource" 2018-11-16 13:42:39 +01:00
virlockspace.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virlog.c util: Fix the default log output to 'journald' when running under systemd 2019-01-08 10:01:54 +01:00
virlog.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmacaddr.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virmacaddr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmacmap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virmacmap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmdev.c qemu: vfio-ap device support 2018-10-29 12:45:54 -04:00
virmdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virmodule.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
virmodule.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdev.c virPCIGetNetName: Initialize @netname to NULL 2019-01-24 10:02:31 +01:00
virnetdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevbandwidth.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevbandwidth.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevbridge.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevbridge.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevip.c virnetdevip: Avoid cast align warning 2019-01-15 13:00:52 +01:00
virnetdevip.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevmacvlan.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevmacvlan.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevmidonet.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevmidonet.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevopenvswitch.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevopenvswitch.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevtap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevtap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevveth.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevveth.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevvlan.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevvlan.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdevvportprofile.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdevvportprofile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetlink.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetlink.h util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback() 2019-01-10 12:35:43 -05:00
virnodesuspend.c util: Fix naming in util/virnodesuspend 2017-03-27 13:13:29 +02:00
virnodesuspend.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnuma.c util: numa: use VIR_AUTOPTR for aggregate types 2018-08-07 16:29:56 +02:00
virnuma.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virobject.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virobject.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virpci.c virpci: Fix memleak in virPCIDeviceIterDevices 2019-01-24 10:11:27 +01:00
virpci.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virperf.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virperf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virpidfile.c util: pidfile: use VIR_AUTOFREE instead of VIR_FREE for scalar types 2018-08-07 16:29:56 +02:00
virpidfile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virpolkit.c Merge WITH_POLKIT1 and WITH_POLKIT 2018-03-14 12:46:26 +01:00
virpolkit.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virportallocator.c virPortAllocatorSetUsed: ignore port 0 2019-01-25 14:50:05 +01:00
virportallocator.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virprobe.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virprocess.c virprocess: Make virProcessRunInMountNamespace use virProcessRunInFork 2018-11-16 13:42:38 +01:00
virprocess.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virqemu.c util: Fix misaligned arguments and misaligned conditions for [if|while|...] 2018-09-24 10:02:40 +02:00
virqemu.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virrandom.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virrandom.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virresctrl.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virresctrl.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virresctrlpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virrotatingfile.c Drop \n at the end of VIR_DEBUG messages 2018-09-19 14:05:59 +02:00
virrotatingfile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virscsi.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virscsi.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virscsihost.c util: Move scsi_host specific functions from virutil 2017-02-19 06:45:09 -05:00
virscsihost.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virscsivhost.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virscsivhost.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virseclabel.c
virseclabel.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsecret.c util: Move virSecretUsageType to virsecret.h 2017-09-21 15:46:48 -04:00
virsecret.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsexpr.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virsexpr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsocketaddr.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virsocketaddr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstorageencryption.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstorageencryption.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstoragefile.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstoragefile.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstoragefilebackend.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstoragefilebackend.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstring.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virstring.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsysinfo.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsysinfo.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsysinfopriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsystemd.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsystemd.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsystemdpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virthread.c util: gettid() is Linux-specific 2017-12-05 11:28:19 +01:00
virthread.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virthreadjob.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virthreadjob.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virthreadpool.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virthreadpool.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virtime.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virtime.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virtpm.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virtpm.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virtypedparam.c virTypedParamsDeserialize: set nparams to 0 in case of an error 2018-07-23 14:28:58 -04:00
virtypedparam.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viruri.c util: fix handling of unspecified port in URI 2018-11-14 17:09:41 +00:00
viruri.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virusb.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virusb.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virutil.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virutil.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
viruuid.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
viruuid.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virvhba.c util: virvhba: fix typo that breaks build on non-linux systems 2017-02-19 15:47:27 +01:00
virvhba.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virvsock.c util: create virvsock.c 2018-05-29 15:42:03 +02:00
virvsock.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virxdrdefs.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virxml.c Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
virxml.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00