<div dir="ltr"><div>Hi,<br><br></div><div>first thanks for your comments.<br><br></div><div>I have one question regarding the copyright in files: storage_event.[ch], since they are copy of network_event.[ch], with changes needed for storage pool lifecycle events.<br>Which way will be the best to handle the copyright in these files?<br><br></div><div>Thanks,<br></div><div>Jovanka<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 6:49 AM, Peter Krempa <span dir="ltr"><<a href="mailto:pkrempa@redhat.com" target="_blank">pkrempa@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jun 13, 2016 at 18:38:39 +0200, Jovanka Gulicoska wrote:<br>
> Add storage event handling infrastructure to storage_event.[ch], following<br>
> the network_event.[ch] pattern.<br>
> ---<br>
> src/Makefile.am | 5 +<br>
> src/conf/storage_conf.h | 4 +<br>
> src/conf/storage_event.c | 237 +++++++++++++++++++++++++++++++++++++++++++++++<br>
> src/conf/storage_event.h | 60 ++++++++++++<br>
> src/libvirt_private.syms | 5 +<br>
> 5 files changed, 311 insertions(+)<br>
> create mode 100644 src/conf/storage_event.c<br>
> create mode 100644 src/conf/storage_event.h<br>
><br>
> diff --git a/src/Makefile.am b/src/Makefile.am<br>
> index ee4a7bf..cb9bf9b 100644<br>
> --- a/src/Makefile.am<br>
> +++ b/src/Makefile.am<br>
> @@ -342,6 +342,9 @@ DOMAIN_EVENT_SOURCES = \<br>
> NETWORK_EVENT_SOURCES = \<br>
> conf/network_event.c conf/network_event.h<br>
><br>
> +STORAGE_POOL_EVENT_SOURCES = \<br>
<br>
</span>Variable name contains "POOL"<br>
<br>
> + conf/storage_event.c conf/storage_event.h<br>
<br>
but files don't<br>
<span class=""><br>
> +<br>
> # Network driver generic impl APIs<br>
> NETWORK_CONF_SOURCES = \<br>
> conf/network_conf.c conf/network_conf.h \<br>
<br>
</span><span class="">> diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h<br>
> index 54116a6..185ae5e 100644<br>
> --- a/src/conf/storage_conf.h<br>
> +++ b/src/conf/storage_conf.h<br>
> @@ -31,6 +31,7 @@<br>
> # include "virthread.h"<br>
> # include "device_conf.h"<br>
> # include "node_device_conf.h"<br>
> +# include "object_event.h"<br>
><br>
> # include <libxml/tree.h><br>
><br>
> @@ -296,6 +297,9 @@ struct _virStorageDriverState {<br>
> char *autostartDir;<br>
> char *stateDir;<br>
> bool privileged;<br>
> +<br>
> + /* Immutable pointer, self-locking APIs */<br>
> + virObjectEventStatePtr storageEventState;<br>
<br>
</span>This isn't used anywhere as of this patch.<br>
<span class=""><br>
> };<br>
><br>
> typedef struct _virStoragePoolSourceList virStoragePoolSourceList;<br>
> diff --git a/src/conf/storage_event.c b/src/conf/storage_event.c<br>
> new file mode 100644<br>
> index 0000000..c5688be<br>
> --- /dev/null<br>
> +++ b/src/conf/storage_event.c<br>
> @@ -0,0 +1,237 @@<br>
> +/*<br>
> + * storage_event.c: storage event queue processing helpers<br>
> + *<br>
> + * Copyright (C) 2010-2014 Red Hat, Inc.<br>
> + * Copyright (C) 2008 VirtualIron<br>
> + * Copyright (C) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.<br>
<br>
</span>This copyright was copied somewhere but not updated/cleaned up.<br>
<span class=""><br>
> + * This library is free software; you can redistribute it and/or<br>
> + * modify it under the terms of the GNU Lesser General Public<br>
> + * License as published by the Free Software Foundation; either<br>
> + * version 2.1 of the License, or (at your option) any later version.<br>
> + *<br>
> + * This library is distributed in the hope that it will be useful,<br>
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br>
> + * Lesser General Public License for more details.<br>
> + *<br>
> + * You should have received a copy of the GNU Lesser General Public<br>
> + * License along with this library. If not, see<br>
> + * <<a href="http://www.gnu.org/licenses/" rel="noreferrer" target="_blank">http://www.gnu.org/licenses/</a>>.<br>
> +*/<br>
<br>
</span>[...]<br>
<span class=""><br>
> diff --git a/src/conf/storage_event.h b/src/conf/storage_event.h<br>
> new file mode 100644<br>
> index 0000000..6f244be<br>
> --- /dev/null<br>
> +++ b/src/conf/storage_event.h<br>
> @@ -0,0 +1,60 @@<br>
> +/*<br>
> + * storage_event.h: storage event queue processing helpers<br>
> + *<br>
> + * Copyright (C) 2010-2014 Red Hat, Inc.<br>
> + * Copyright (C) 2008 VirtualIron<br>
> + * Copyright (C) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.<br>
<br>
</span>Same as above regarding copyright.<br>
<span class=""><br>
> + *<br>
> + * This library is free software; you can redistribute it and/or<br>
> + * modify it under the terms of the GNU Lesser General Public<br>
> + * License as published by the Free Software Foundation; either<br>
> + * version 2.1 of the License, or (at your option) any later version.<br>
> + *<br>
> + * This library is distributed in the hope that it will be useful,<br>
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br>
> + * Lesser General Public License for more details.<br>
> + *<br>
> + * You should have received a copy of the GNU Lesser General Public<br>
> + * License along with this library. If not, see<br>
> + * <<a href="http://www.gnu.org/licenses/" rel="noreferrer" target="_blank">http://www.gnu.org/licenses/</a>>.<br>
> +*/<br>
> +<br>
> +#include "internal.h"<br>
> +#include "object_event.h"<br>
> +#include "object_event_private.h"<br>
> +<br>
> +#ifndef __STORAGE_POOL_EVENT_H__<br>
<br>
</span>Macro name contains POOL but file name doesn't<br>
<br>
> +# define __STORAGE_POOL_EVENT_H__<br>
> +<br>
</blockquote></div><br></div>