Re: [PATCH 1/9] qemu: Move close callbacks handling into util/virclosecallbacks.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 17, 2013 at 03:04:18PM +0200, Michal Privoznik wrote:
> ---
>  po/POTFILES.in               |   1 +
>  src/Makefile.am              |   4 +-
>  src/libvirt_private.syms     |   7 +
>  src/qemu/qemu_conf.c         | 295 +-------------------------------------
>  src/qemu/qemu_conf.h         |  25 +---
>  src/qemu/qemu_driver.c       |   4 +-
>  src/qemu/qemu_migration.c    |  18 +--
>  src/qemu/qemu_migration.h    |   2 +-
>  src/qemu/qemu_process.c      |  14 +-
>  src/util/virclosecallbacks.c | 332 +++++++++++++++++++++++++++++++++++++++++++
>  src/util/virclosecallbacks.h |  53 +++++++
>  11 files changed, 418 insertions(+), 337 deletions(-)
>  create mode 100644 src/util/virclosecallbacks.c
>  create mode 100644 src/util/virclosecallbacks.h
> 
> +
> +typedef struct _virCloseCallbacks virCloseCallbacks;
> +typedef virCloseCallbacks *virCloseCallbacksPtr;
> +
> +typedef virDomainObjPtr (*virCloseCallback)(void *driver,
> +                                            virDomainObjPtr vm,
> +                                            virConnectPtr conn);

I have a preference for the 'void *' callback parameter to be
last in the parameter list, and also named 'void *opaque'

> +virCloseCallbacksPtr virCloseCallbacksNew(void);
> +int virCloseCallbacksSet(virCloseCallbacksPtr closeCallbacks,
> +                         virDomainObjPtr vm,
> +                         virConnectPtr conn,
> +                         virCloseCallback cb);
> +int virCloseCallbacksUnset(virCloseCallbacksPtr closeCallbacks,
> +                           virDomainObjPtr vm,
> +                           virCloseCallback cb);
> +virCloseCallback
> +virCloseCallbacksGet(virCloseCallbacksPtr closeCallbacks,
> +                     virDomainObjPtr vm,
> +                     virConnectPtr conn);
> +void
> +virCloseCallbacksRun(virCloseCallbacksPtr closeCallbacks,
> +                     virConnectPtr conn,
> +                     virDomainObjListPtr domains,
> +                     void *driver);

Again s/driver/opaque/, and in the various other files where
this name is used.


ACK if the param is renamed & moved to be last

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]