From patchwork Thu Jun 6 15:06:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomoki Sekiyama X-Patchwork-Id: 249444 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B82B82C007A for ; Fri, 7 Jun 2013 01:08:19 +1000 (EST) Received: from localhost ([::1]:60165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbnV-0004OL-OU for incoming@patchwork.ozlabs.org; Thu, 06 Jun 2013 11:08:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukbmz-0004Ew-H7 for qemu-devel@nongnu.org; Thu, 06 Jun 2013 11:07:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ukbmw-0002BN-RF for qemu-devel@nongnu.org; Thu, 06 Jun 2013 11:07:45 -0400 Received: from usindpps06.hds.com ([207.126.252.19]:43278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ukbmw-0002Ae-MH for qemu-devel@nongnu.org; Thu, 06 Jun 2013 11:07:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hds.com; h=subject : to : from : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=mail1; bh=4ql/0rHoOS/oA58uwfZUNoDEQFczn9lVaeUxQZoXpsw=; b=gz8zglEETk0XTk7thPuRiWbqLr48M6LliTyXih49Mx1eEl6MOhJqokwtXYLsUg7nxDqL p6uE3jAERR/9QCms4cMbUCIts6d2ZzEgXILdwIG2pHF0cwVIvCgOhDtMbqWFCLBQQOi4 UI+EN3dpk6OBBTdL8u+2uy/LL193IDus1IPlhXShvZHcNPJlieqDAHoBkgN8v4CJJR2d rhm0rz6jhyPO6j+5p+5NazJ3ogkmWqRPVtZR0CSG95tq/WfJJLErNLstZwSEgufvK6wh TT33t2YTXOLNgDXExL1ZMty+k7jR58wrftHW/An4zLrCc0lJ6jt0xg8m8qAyJG5H1Fq/ vQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hdsstg.com; h=subject : to : from : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=mail1; bh=4ql/0rHoOS/oA58uwfZUNoDEQFczn9lVaeUxQZoXpsw=; b=l4uJvMOoqqvUBNxQWL66Q3iQew6WG3fvQ2KdO5CcaGNnQrlYHxKAGfFTjidrd6bePPzK yToRziQZh5yLuZS6p/cqWHFxcj/b7ibSdn604LzDeVxPFSgRL9irOPXxhJy9FcOP5vUC 8iSfUmitIMua54iEBWC4cZYGXN9lB5ojZL0ZmBj5tllv3mQcc4JuirMDsfsacSWfGSKT s5ajbS7CQJmcYvUdZl5589/1UPt4nUBJmDBR7c9XzSOu30kxko3G8GXfuQYr95yjQ3Rz KuCKEMGE0WZksyZnuW8oB+jtFXiLioD2txwIOAV5qF7XLb8oPr+6w/w2tx9K48wIeTFE yg== Received: from usindmail02.hds.com (usindmail02 [207.126.252.21]) by usindpps06.hds.com (8.14.4/8.14.4) with ESMTP id r56F70tC025988; Thu, 6 Jun 2013 08:07:00 -0700 Received: from hds.com (usindnetf5d-vlan47float.corp.hds.com [10.74.73.11]) by usindmail02.hds.com (8.14.1/8.14.1) with ESMTP id r56F6wIL008178; Thu, 6 Jun 2013 11:06:59 -0400 (EDT) To: qemu-devel@nongnu.org From: Tomoki Sekiyama Date: Thu, 06 Jun 2013 11:06:57 -0400 Message-ID: <20130606150657.10486.19314.stgit@hds.com> In-Reply-To: <20130606150618.10486.60669.stgit@hds.com> References: <20130606150618.10486.60669.stgit@hds.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 mx ip4:207.126.244.0/26 ip4:207.126.252.0/25 include:mktomail.com include:cloud.hds.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8626, 1.0.431, 0.0.0000 definitions=2013-06-06_06:2013-06-06, 2013-06-06, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=outbound_policy score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1211240000 definitions=main-1306060111 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 207.126.252.19 Cc: libaiqing@huawei.com, stefanha@gmail.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com, vrozenfe@redhat.com, pbonzini@redhat.com, seiji.aguchi@hds.com, areis@redhat.com Subject: [Qemu-devel] [PATCH v4 09/10] qemu-ga: install Windows VSS provider on `qemu-ga -s install' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Register QGA VSS provider library into Windows when qemu-ga is installed as Windows service ('-s install' option). It is deregistered when the service is uninstalled ('-s uninstall' option). Signed-off-by: Tomoki Sekiyama --- qga/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qga/main.c b/qga/main.c index 8bcedaf..739b958 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1058,8 +1058,16 @@ int main(int argc, char **argv) fixed_state_dir = (state_dir == dfl_pathnames.state_dir) ? NULL : state_dir; +#ifdef HAS_VSS_SDK + if (FAILED(COMRegister())) { + return EXIT_FAILURE; + } +#endif return ga_install_service(path, log_filepath, fixed_state_dir); } else if (strcmp(service, "uninstall") == 0) { +#ifdef HAS_VSS_SDK + COMUnregister(); +#endif return ga_uninstall_service(); } else { printf("Unknown service command.\n");