[libvirt] [PATCH] Support for virtualbox version 3.1

Matthias Bolte matthias.bolte at googlemail.com
Fri Nov 20 11:17:19 UTC 2009


2009/11/20 pritesh <Pritesh.Kothari at sun.com>:
>> Well, apart from the new auto generated files for version 3.1 support
>> a huge part of the patch affects vbox_tmpl.c, ~7700 lines changed.
>> Most of that are pure indentation level changes, due to inverting the
>> logic of some common error checks. Applying the patch and creating a
>> new patch using git diff -b to ignore pure whitespace changes results
>> in ~2200 lines changed. And even most of this 2200 lines are due to
>> the wrapping of some common code patterns into macros; mostly
>> free/release calls. The actual functional change of this patch is
>> fairly small. You should have split this at least into two separate
>> patches.
>
> After a second look at the macros, they really do different stuff in < 3.1 and
> for 3.1 for e.g: the medium release has imedium object in the vtables for <
> 3.1 while for 3.1 and above it directly calls release and the imedium object
> is not there any more.
>
> #if VBOX_API_VERSION < 3001
>
> #define VBOX_MEDIUM_RELEASE(arg) \
> if(arg)\
>    (arg)->vtbl->imedium.nsisupports.Release((nsISupports *)(arg))
>
> #else  /* VBOX_API_VERSION >= 3001 */
>
> #define VBOX_MEDIUM_RELEASE(arg) \
> if(arg)\
>    (arg)->vtbl->nsisupports.Release((nsISupports *)(arg))
>
> #endif /* VBOX_API_VERSION >= 3001 */
>
> but still, will try to split the patch without breaking 3.1
>
> Regards,
> Pritesh
>

Well, don't waste your time trying to split it if it's not that simple.

Matthias




More information about the libvir-list mailing list