]> git.ipfire.org Git - thirdparty/libvirt.git/commit
api: add overflow error
authorEric Blake <eblake@redhat.com>
Fri, 2 Mar 2012 23:58:05 +0000 (16:58 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 8 Mar 2012 01:24:43 +0000 (18:24 -0700)
commit239fb8c46bbbbc76189dd7874c737dce6399ab87
tree7bb7632baa01e7a84f750f968abee0c9d6820156
parent9dfdeadc8aacf8443fac01f907632c9a8867ca06
api: add overflow error

Overflow can be user-induced, so it deserves more than being called
an internal error.  Note that in general, 32-bit platforms have
far more places to trigger this error (anywhere the public API
used 'unsigned long' but the other side of the connection is a
64-bit server); but some are possible on 64-bit platforms (where
the public API computes the product of two numbers).

* include/libvirt/virterror.h (VIR_ERR_OVERFLOW): New error.
* src/util/virterror.c (virErrorMsg): Translate it.
* src/libvirt.c (virDomainSetVcpusFlags, virDomainGetVcpuPinInfo)
(virDomainGetVcpus, virDomainGetCPUStats): Use it.
* daemon/remote.c (HYPER_TO_TYPE): Likewise.
* src/qemu/qemu_driver.c (qemuDomainBlockResize): Likewise.
daemon/remote.c
include/libvirt/virterror.h
src/libvirt.c
src/qemu/qemu_driver.c
src/util/virterror.c