[libvirt] [PATCH 04/12] util: storage: Add notice for extension of struct virStorageSource

John Ferlan jferlan at redhat.com
Thu Nov 20 15:09:32 UTC 2014



On 11/12/2014 08:47 AM, Peter Krempa wrote:
> As we now have a deep copy function for struct virStorageSource add a
> notice that extensions of the structure require also appropriate changes
> to the virStorageSourceCopy func.
> ---
>  src/util/virstoragefile.h | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
> index 2583e10..7f3f353 100644
> --- a/src/util/virstoragefile.h
> +++ b/src/util/virstoragefile.h
> @@ -228,9 +228,11 @@ typedef virStorageDriverData *virStorageDriverDataPtr;
>  typedef struct _virStorageSource virStorageSource;
>  typedef virStorageSource *virStorageSourcePtr;
> 
> -/* Stores information related to a host resource.  In the case of
> - * backing chains, multiple source disks join to form a single guest
> - * view.  */
> +/* Stores information related to a host resource.  In the case of backing
> + * chains, multiple source disks join to form a single guest view.
> + *
> + * IMPORTANT: When adding fields to this struct it's also necessary to add
> + * apropriate code to thevirStorageSourceCopy deep copy function */

s/apropriate/appropriate
s/thevir.../the vir.../

Too bad there wasn't some way to automagically detect this...

ACK

John

>  struct _virStorageSource {
>      int type; /* virStorageType */
>      char *path;
> 




More information about the libvir-list mailing list