[libvirt] [PATCHv2 02/15] api: add overflow error

Peter Krempa pkrempa at redhat.com
Tue Mar 6 12:54:36 UTC 2012


On 03/06/2012 01:34 AM, Eric Blake wrote:
> Overflow can be user-induced, so it deserves more than being called
> an internal error.  Note that in general, 32-bit platforms have

Definitely. Internal error is always somewhat scary to users.

> 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.
> ---

ACK,

Peter




More information about the libvir-list mailing list