From nobody Thu May 15 13:59:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1510094206129651.2124464776368; Tue, 7 Nov 2017 14:36:46 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A259C0587CA; Tue, 7 Nov 2017 22:36:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF40B5D756; Tue, 7 Nov 2017 22:36:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E64691800BDE; Tue, 7 Nov 2017 22:36:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA7Mafm9026309 for ; Tue, 7 Nov 2017 17:36:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 981705D965; Tue, 7 Nov 2017 22:36:41 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 916FC5D964 for ; Tue, 7 Nov 2017 22:36:39 +0000 (UTC) Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE55D61D22 for ; Tue, 7 Nov 2017 22:36:37 +0000 (UTC) Received: by mail-qk0-f177.google.com with SMTP id b15so1077367qkg.9 for ; Tue, 07 Nov 2017 14:36:37 -0800 (PST) Received: from dawid-fedora.datto.lan ([47.19.105.250]) by smtp.gmail.com with ESMTPSA id s82sm1639872qke.68.2017.11.07.14.36.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Nov 2017 14:36:35 -0800 (PST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7A259C0587CA Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7A259C0587CA Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=datto-com.20150623.gappssmtp.com header.i=@datto-com.20150623.gappssmtp.com header.b="VVZhWj9j" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DE55D61D22 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dzamirski@datto.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com DE55D61D22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datto-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=kOsUkq2ASG7pv1vJSgOkNQ/7NxXfBdwIs1JoctPkdUY=; b=VVZhWj9jHJRDj936VguzzFG3y/F04S91GbMdgKmrGj8hsSwgbB7BErXc6LtYpPhoSM aQ8rBp7uEzf3AU/EmRO9NPYlJNJ7wX/ijeMd0YA6q3p3NETWcZLPEnJF7IsSdXeQyRbb u/hmV1E7Fxn2hRGTc4jJ02+aEhPnSDuoKEF1uylNwNpWCrOPlV5W2oMt5ZIF30ZysCNA bWECMxBxCNfgt5c/b+Q6OSgmhC6DLzExWTmo2llZ7dtkahh+mM4QDwH8w/rLg0bhKuTJ 0n201WGMhn+qJfbDm1DfDZRz+074xwfHJmd8SDTkNE01/2RDuGQ9DTY5vafzjNEvWh+Z hbvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=kOsUkq2ASG7pv1vJSgOkNQ/7NxXfBdwIs1JoctPkdUY=; b=Pj9V8eadNLhHOQNhfnjZoemAj/Bc67OYS/cYTm4/1FIGo9FPY9uGFN197OYh4lTqks Jgto/14k05pq2XxNp3bRsIxm7zn050JPKf9RNgkSX9EaSSZPdRA71bTiOfAtjkKUmuFL twQdb/GuNF55g762BuYOtuLvB5pyP/zs16hd9Y62f9L63OUrZ/01A9aGZRhLADFDSI5q yeBXYffL1TXww70Ih2EmIGs4q4hY8QdYZa+ea7fk/FNNu4WGVkA48eRf23JsZLh/AQIZ Qd9FWhExLm0ec2h5YKjbgLrsp7fYrW7He+h4251miNvK7OusGMVClW9FZXdrROHhjYpe m5Rw== X-Gm-Message-State: AJaThX5AZEN20hCa/TkRAfaCb3QXTTDxMWvwZCee3hpzWUrSl/MEsGNr 7iCGc7a4SoQbDSsqLjtJ7V4isQknFbE= X-Google-Smtp-Source: ABhQp+Ta+sNyP7e3HFpv19tV7JwqT66nzpYQ8td5zVosuQTjOZpKVH0sZIAKji7kZFoVuArI0Njm8Q== X-Received: by 10.55.25.18 with SMTP id k18mr503598qkh.336.1510094196917; Tue, 07 Nov 2017 14:36:36 -0800 (PST) From: Dawid Zamirski To: libvir-list@redhat.com Date: Tue, 7 Nov 2017 17:36:34 -0500 Message-Id: <20171107223634.6018-2-dzamirski@datto.com> In-Reply-To: <20171107223634.6018-1-dzamirski@datto.com> References: <20171107223634.6018-1-dzamirski@datto.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 07 Nov 2017 22:36:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 07 Nov 2017 22:36:38 +0000 (UTC) for IP:'209.85.220.177' DOMAIN:'mail-qk0-f177.google.com' HELO:'mail-qk0-f177.google.com' FROM:'dzamirski@datto.com' RCPT:'' X-RedHat-Spam-Score: -0.031 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.220.177 mail-qk0-f177.google.com 209.85.220.177 mail-qk0-f177.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] vbox: Add support for 5.2.x X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 07 Nov 2017 22:36:45 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Simply add the 5.2 SDK header to the existing unified framework. No other special handling is needed as there's no API break between exising 5.1 and the just added 5.2. --- src/Makefile.am | 1 + src/vbox/vbox_V5_2.c | 13 +++++++++++++ src/vbox/vbox_common.h | 2 ++ src/vbox/vbox_storage.c | 2 ++ src/vbox/vbox_tmpl.c | 2 ++ src/vbox/vbox_uniformed_api.h | 1 + 6 files changed, 21 insertions(+) create mode 100644 src/vbox/vbox_V5_2.c diff --git a/src/Makefile.am b/src/Makefile.am index 1d2423124..de43d0f50 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -881,6 +881,7 @@ VBOX_DRIVER_SOURCES =3D \ vbox/vbox_V4_3_4.c vbox/vbox_CAPI_v4_3_4.h \ vbox/vbox_V5_0.c vbox/vbox_CAPI_v5_0.h \ vbox/vbox_V5_1.c vbox/vbox_CAPI_v5_1.h \ + vbox/vbox_V5_2.c vbox/vbox_CAPI_v5_2.h \ vbox/vbox_common.c vbox/vbox_common.h \ vbox/vbox_uniformed_api.h \ vbox/vbox_get_driver.h \ diff --git a/src/vbox/vbox_V5_2.c b/src/vbox/vbox_V5_2.c new file mode 100644 index 000000000..86d40f3f7 --- /dev/null +++ b/src/vbox/vbox_V5_2.c @@ -0,0 +1,13 @@ +/** @file vbox_V5_2.c + * C file to include support for multiple versions of VirtualBox + * at runtime. + */ + +#include + +/** The API Version */ +#define VBOX_API_VERSION 5002000 +/** Version specific prefix. */ +#define NAME(name) vbox52##name + +#include "vbox_tmpl.c" diff --git a/src/vbox/vbox_common.h b/src/vbox/vbox_common.h index 05636fea2..5709ff8b4 100644 --- a/src/vbox/vbox_common.h +++ b/src/vbox/vbox_common.h @@ -446,6 +446,8 @@ typedef nsISupports IKeyboard; vbox50InstallUniformedAPI(&gVBoxAPI); \ } else if (uVersion >=3D 5000051 && uVersion < 5001051) { \ vbox51InstallUniformedAPI(&gVBoxAPI); \ + } else if (uVersion >=3D 5001051 && uVersion < 5002051) { \ + vbox52InstallUniformedAPI(&gVBoxAPI); \ } else { \ result =3D -1; \ } \ diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c index c2de1ce23..672caa6f9 100644 --- a/src/vbox/vbox_storage.c +++ b/src/vbox/vbox_storage.c @@ -902,6 +902,8 @@ virStorageDriverPtr vboxGetStorageDriver(uint32_t uVers= ion) vbox50InstallUniformedAPI(&gVBoxAPI); } else if (uVersion >=3D 5000051 && uVersion < 5001051) { vbox51InstallUniformedAPI(&gVBoxAPI); + } else if (uVersion >=3D 5001051 && uVersion < 5002051) { + vbox52InstallUniformedAPI(&gVBoxAPI); } else { return NULL; } diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 98d4bbf0d..88792c992 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -65,6 +65,8 @@ # include "vbox_CAPI_v5_0.h" #elif VBOX_API_VERSION =3D=3D 5001000 # include "vbox_CAPI_v5_1.h" +#elif VBOX_API_VERSION =3D=3D 5002000 +# include "vbox_CAPI_v5_2.h" #else # error "Unsupport VBOX_API_VERSION" #endif diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index c51191e7d..65c24d094 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -564,5 +564,6 @@ void vbox43InstallUniformedAPI(vboxUniformedAPI *pVBoxA= PI); void vbox43_4InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox50InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox51InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); +void vbox52InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); =20 #endif /* VBOX_UNIFORMED_API_H */ --=20 2.14.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list