From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfV2j-00029I-Ts for qemu-devel@nongnu.org; Thu, 23 May 2013 08:54:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfUXJ-0004VK-9Z for qemu-devel@nongnu.org; Thu, 23 May 2013 08:22:39 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:48363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfUXI-0004Uw-LO for qemu-devel@nongnu.org; Thu, 23 May 2013 08:22:25 -0400 Received: by mail-wi0-f176.google.com with SMTP id hr14so4525725wib.9 for ; Thu, 23 May 2013 05:22:23 -0700 (PDT) Date: Thu, 23 May 2013 14:22:21 +0200 From: Stefan Hajnoczi Message-ID: <20130523122221.GL9093@stefanha-thinkpad.redhat.com> References: <20130521153333.4880.74390.stgit@hds.com> <20130521153352.4880.26947.stgit@hds.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130521153352.4880.26947.stgit@hds.com> Subject: Re: [Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tomoki Sekiyama Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, vrozenfe@redhat.com, pbonzini@redhat.com, seiji.aguchi@hds.com, areis@redhat.com On Tue, May 21, 2013 at 11:33:52AM -0400, Tomoki Sekiyama wrote: > Implements a basic stub of software VSS provider. Currently, this modules > only provides a relay function of events between qemu-guest-agent and > Windows VSS when VSS finished filesystem freeze and when qemu snapshot > is done. > > In the future, this module could be extended to support the other VSS > functions, such as query for snapshot volumes and recovery. > > Signed-off-by: Tomoki Sekiyama > --- > Makefile.objs | 2 > configure | 5 > qga/Makefile.objs | 6 > qga/vss-win32-provider.h | 26 ++ > qga/vss-win32-provider/Makefile.objs | 21 + > qga/vss-win32-provider/install.cpp | 494 +++++++++++++++++++++++++++++++ > qga/vss-win32-provider/provider.cpp | 474 ++++++++++++++++++++++++++++++ > qga/vss-win32-provider/qga-provider.def | 10 + > qga/vss-win32-provider/qga-provider.idl | 20 + > qga/vss-win32.h | 85 +++++ > 10 files changed, 1142 insertions(+), 1 deletion(-) > create mode 100644 qga/vss-win32-provider.h > create mode 100644 qga/vss-win32-provider/Makefile.objs > create mode 100644 qga/vss-win32-provider/install.cpp > create mode 100644 qga/vss-win32-provider/provider.cpp > create mode 100644 qga/vss-win32-provider/qga-provider.def > create mode 100644 qga/vss-win32-provider/qga-provider.idl > create mode 100644 qga/vss-win32.h Please run scripts/checkpatch.pl and use QEMU coding style (see ./CODING_STYLE and ./HACKING). > diff --git a/qga/vss-win32-provider/Makefile.objs b/qga/vss-win32-provider/Makefile.objs > new file mode 100644 > index 0000000..73ef752 > --- /dev/null > +++ b/qga/vss-win32-provider/Makefile.objs > @@ -0,0 +1,21 @@ > +# rules to build qga-provider.dll > + > +qga-obj-y += qga-provider.dll > +qga-prv-obj-y += provider.o install.o > + > +obj-qga-prv-obj-y = $(addprefix $(obj)/, $(qga-prv-obj-y)) > +$(obj-qga-prv-obj-y): QEMU_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -fstack-protector-all, $(QEMU_CFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor > + > +$(obj)/qga-provider.dll: LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lole32 -loleaut32 -lshlwapi -luuid -static > +$(obj)/qga-provider.dll: $(obj-qga-prv-obj-y) $(SRC_PATH)/$(obj)/qga-provider.def $(obj)/qga-provider.tlb > + $(call quiet-command,$(CXX) -o $@ $(qga-prv-obj-y) $(SRC_PATH)/qga/vss-win32-provider/qga-provider.def $(CXXFLAGS) $(LDFLAGS)," LINK $(TARGET_DIR)$@") > + > + > +# rules to build qga-provider.tlb > +# Currently, only native build is supported because building .tlb > +# (TypeLibrary) from .idl requires WindowsSDK and MIDL (included in VC++). > +MIDL=midl > +WINSDK="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Include" This needs to be a ./configure option. > 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 > + * > + * 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 > +#include > + > +/* 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?