[netcf-devel] [PATCH 1/2] Making changes based on suggestions from Eric Blake

Eric Blake eblake at redhat.com
Fri Sep 17 15:00:22 UTC 2010


On 09/17/2010 08:45 AM, Adam Stokes wrote:
> https://fedorahosted.org/pipermail/netcf-devel/2010-September/000449.html
> ---
>   autogen.sh            |    2 +-
>   bootstrap             |   29 ++++++++--------
>   configure.ac          |    9 +----
>   mingw32-netcf.spec.in |   14 +++----
>   src/Makefile.am       |    6 +--
>   src/netcf.c           |   39 ++++++++++++++++++++++
>   src/netcf_win.c       |   86 ++++++++++---------------------------------------
>   src/netcf_win.h       |   25 +-------------
>   8 files changed, 83 insertions(+), 127 deletions(-)

This looks like it is a diff to your original patch.  Can you instead 
rebase it to post only the patch against the current master sources, so 
the git history doesn't have a botched patch followed by cleanup, but 
rather a single (or series) of good patches?

>
> diff --git a/autogen.sh b/autogen.sh
> index 156c5fa..b0197c3 100755
> --- a/autogen.sh
> +++ b/autogen.sh
> @@ -85,7 +85,7 @@ fi
>   mkdir -p $BUILD_AUX
>
>   $LIBTOOLIZE --copy --force
> -./bootstrap $GNULIB_SRCDIR
> +./bootstrap ${GNULIB_SRCDIR:+--gnulib-srcdir="$GNULIB_SRCDIR"}

This one is already upstream - more evidence that you need to rebase.

>
>   %changelog
> -* Mon Sep 1 2010 Adam Stokes<ajs at redhat.com>  - 0.1.6-2
> -- Update spec to not require .dll.a or *.la
> -- Fixed building of DLL
> -
> -* Thu Apr 16 2010 Laine Stump<laine at redhat.com>  - 0.1.6-1
> -- New version
> +* Mon Sep 1 2010 Adam Stokes<ajs at redhat.com>  - 0.1.6-1
> +- MinGW Port

mingw32-netcf.spec.in doesn't exist upstream yet, so how is your diff 
removing mention of 0.1.6-2 in the first place?

>       (*ncf)->debug = getenv("NETCF_DEBUG") != NULL;
> +#ifdef WIN32
> +    return 0;
> +#else
> +    /* Needs investigation on WIN32 */
>       return drv_init(*ncf);

Move the added comment up two lines, to be within the #ifdef WIN32 block.

> +#endif
>    oom:
>       ncf_close(*ncf);
>       *ncf = NULL;
> @@ -159,12 +164,16 @@ struct netcf_if * ncf_lookup_by_name(struct netcf *ncf, const char *name) {
>       return drv_lookup_by_name(ncf, name);
>   }
>
> +#ifdef WIN32
> +int ncf_lookup_by_mac_string() { return -1; }

Add a comment about no mingw implementation.

>
> -    ipAddrTable = (PMIB_IPADDRTABLE) malloc(sizeof (MIB_IPADDRTABLE));
> +    ipAddrTable = (PMIB_IPADDRTABLE) sizeof (MIB_IPADDRTABLE);

How does this change even compile?

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


More information about the netcf-devel mailing list