Re: [PATCH v4 1/3] qemu: extract PCI handling structs

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

 



On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote:
> Introduce new files (domain_addr.[ch]) to provide
> an API for domain device handling that could be
> shared across the drivers.
> 
> A list of data types were extracted and moved there:
> 
>  qemuDomainPCIAddressBus -> virDomainPCIAddressBus
>  qemuDomainPCIAddressBusPtr -> virDomainPCIAddressBusPtr
>  _qemuDomainPCIAddressSet -> virDomainPCIAddressSet
>  qemuDomainPCIAddressSetPtr -> virDomainPCIAddressSetPtr
>  qemuDomainPCIConnectFlags -> virDomainPCIConnectFlags
> 
> Also, move the related definitions and macros.
> ---
>  src/Makefile.am         |   1 +
>  src/conf/domain_addr.c  |  24 +++++++
>  src/conf/domain_addr.h  |  79 ++++++++++++++++++++++
>  src/qemu/qemu_command.c | 171 +++++++++++++++++++++---------------------------
>  src/qemu/qemu_command.h |  49 ++++----------
>  src/qemu/qemu_domain.h  |   6 +-
>  6 files changed, 193 insertions(+), 137 deletions(-)
>  create mode 100644 src/conf/domain_addr.c
>  create mode 100644 src/conf/domain_addr.h
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index e9dc9e0..cfb7097 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -247,6 +247,7 @@ NETDEV_CONF_SOURCES =						\
>  # Domain driver generic impl APIs
>  DOMAIN_CONF_SOURCES =						\
>  		conf/capabilities.c conf/capabilities.h		\
> +		conf/domain_addr.c conf/domain_addr.h		\
>  		conf/domain_conf.c conf/domain_conf.h		\
>  		conf/domain_audit.c conf/domain_audit.h		\
>  		conf/domain_nwfilter.c conf/domain_nwfilter.h	\
> diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
> new file mode 100644
> index 0000000..73e17aa
> --- /dev/null
> +++ b/src/conf/domain_addr.c
> @@ -0,0 +1,24 @@
> +/*
> + * domain_addr.c: helper APIs for managing domain device addresses
> + *
> + * Copyright (C) 2006-2014 Red Hat, Inc.
> + * Copyright (C) 2006 Daniel P. Berrange
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library.  If not, see
> + * <http://www.gnu.org/licenses/>.
> + *
> + * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>

This file addition would look better in the second patch.

> + */
> +
> +#include <config.h>
> diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
> new file mode 100644
> index 0000000..f5a5199
> --- /dev/null
> +++ b/src/conf/domain_addr.h
> @@ -0,0 +1,79 @@
> +/*
> + * domain_addr.h: helper APIs for managing domain device addresses
> + *
> + * Copyright (C) 2006-2014 Red Hat, Inc.
> + * Copyright (C) 2006 Daniel P. Berrange
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library.  If not, see
> + * <http://www.gnu.org/licenses/>.
> + *
> + * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
> + */
> +

I think you should be the author, since you created the file.
Most of the structs and functions were (re)written by Laine anyway and we have
the copyrights and git history for attributions.
But I'd like to hear a second opinion on this.

The rest is just code movement and renaming, ACK.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

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