[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze |
Date: |
Fri, 24 May 2013 10:54:56 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, May 23, 2013 at 06:36:35PM +0000, Tomoki Sekiyama wrote:
> On 5/23/13 8:22 , "Stefan Hajnoczi" <address@hidden> wrote:
>
> >On Tue, May 21, 2013 at 11:33:52AM -0400, Tomoki Sekiyama wrote:
> >> diff --git a/qga/vss-win32.h b/qga/vss-win32.h
> >> new file mode 100644
> >> index 0000000..7600087
> >> --- /dev/null
> >> +++ b/qga/vss-win32.h
> >> @@ -0,0 +1,85 @@
> >> +/*
> >> + * QEMU Guest Agent win32 VSS common declarations
> >> + *
> >> + * Copyright Hitachi Data Systems Corp. 2013
> >> + *
> >> + * Authors:
> >> + * Tomoki Sekiyama <address@hidden>
> >> + *
> >> + * This work is licensed under the terms of the GNU GPL, version 2 or
> >>later.
> >> + * See the COPYING file in the top-level directory.
> >> + */
> >> +
> >> +#ifndef VSS_WIN32_H
> >> +#define VSS_WIN32_H
> >> +
> >> +#define __MIDL_user_allocate_free_DEFINED__
> >> +#include "config-host.h"
> >> +#include <windows.h>
> >> +#include <shlwapi.h>
> >> +
> >> +/* Reduce warnings to include vss.h */
> >> +#define __in IN
> >> +#define __out OUT
> >> +#define __RPC_unique_pointer
> >> +#define __RPC_string
> >> +#define __RPC__deref_inout_opt
> >> +#define __RPC__out
> >> +#ifndef __RPC__out_ecount_part
> >> +#define __RPC__out_ecount_part(x, y)
> >> +#endif
> >> +#define _declspec(x)
> >> +#undef uuid
> >> +#define uuid(x)
> >
> >This looks hacky. Why are you stubbing out macros that vss.h uses?
>
> Because these macros are internally defined/used by windows SDK's
> headers and not fully covered by mingw (some of them is only
> meaningful with Microsoft IDE), so it don't compile without
> these define's.
>
> This could be better if mingw supports these VSS headers, but
> I have no idea how to achieve that...
Please add a comment explaining this.
BTW, did you look at the macro definitions to see if they define
anything important? In other words, is there a difference when compiled
using Visual C++ where the macros actually have meaning?
Stefan
- Re: [Qemu-devel] [RFC PATCH v3 04/11] qemu-ga: Add an configure option to specify path to Windows VSS SDK, (continued)
[Qemu-devel] [RFC PATCH v3 09/11] qemu-ga: Add VSS provider .tlb file in the repository, Tomoki Sekiyama, 2013/05/21
Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS, Laszlo Ersek, 2013/05/23
Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS, Stefan Hajnoczi, 2013/05/23