]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
resize: slightly alter signature
authorEric Blake <eblake@redhat.com>
Mon, 30 Jan 2012 19:04:20 +0000 (12:04 -0700)
committerLaine Stump <laine@laine.org>
Tue, 31 Jan 2012 16:58:06 +0000 (11:58 -0500)
commit055bbf45e4cdac04d9f9893883cb0f5cabfbe27b
tree105028905fb05f0e0e607382331d02821ac2cbd7
parent098a987b98891e526c32682cfc9fb90290f139f5
resize: slightly alter signature

Our existing virDomainBlockResize takes an unsigned long long
argument; if that command is later taught a DELTA and SHRINK flag,
we cannot change its type without breaking API (but at least such
a change would be ABI compatible).  Meanwhile, the only time a
negative size makes sense is if both DELTA and SHRINK are used
together, but if we keep the argument unsigned, applications can
pass the positive delta amount by which they would like to shrink
the system, and have the flags imply the negative value.  So,
since this API has not yet been released, and in the interest of
consistency with existing API, we swap virStorageVolResize to
always pass an unsigned value.

* include/libvirt/libvirt.h.in (virStorageVolResize): Use unsigned
argument.
* src/libvirt.c (virStorageVolResize): Likewise.
* src/driver.h (virDrvStorageVolUpload): Adjust clients.
* src/remote/remote_protocol.x (remote_storage_vol_resize_args):
Likewise.
* src/remote_protocol-structs: Regenerate.
Suggested by Daniel P. Berrange.
include/libvirt/libvirt.h.in
src/driver.h
src/libvirt.c
src/remote/remote_protocol.x
src/remote_protocol-structs