From nobody Fri May 3 03:22:16 2024 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519637178325950.4481828194913; Mon, 26 Feb 2018 01:26:18 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33D7F3DEEB; Mon, 26 Feb 2018 09:26:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBADC5C545; Mon, 26 Feb 2018 09:26:13 +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 3EECE4A46C; Mon, 26 Feb 2018 09:26:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1Q9QBHV016728 for ; Mon, 26 Feb 2018 04:26:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 257BC620B2; Mon, 26 Feb 2018 09:26:11 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC33718EEB for ; Mon, 26 Feb 2018 09:26:10 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D6FAEC047B69 for ; Mon, 26 Feb 2018 09:26:08 +0000 (UTC) Received: from msk-vpn.virtuozzo.com ([195.214.232.6] helo=dim-vz7.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.89) (envelope-from ) id 1eqF2s-0000Pc-M9 for libvir-list@redhat.com; Mon, 26 Feb 2018 12:26:06 +0300 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Mon, 26 Feb 2018 12:25:50 +0300 Message-Id: <1519637151-828210-2-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1519637151-828210-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1519637151-828210-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 26 Feb 2018 09:26:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 26 Feb 2018 09:26:09 +0000 (UTC) for IP:'185.231.240.75' DOMAIN:'relay.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 185.231.240.75 relay.sw.ru 185.231.240.75 relay.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] vz: build fix after excluding cross driver headers 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 26 Feb 2018 09:26:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Build is broken by 5529b057 [1]. [1] cfg: forbid includes of headers in network and storage drivers again Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- src/vz/vz_sdk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 41b0916..3d51067 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -29,6 +29,7 @@ #include "virlog.h" #include "datatypes.h" #include "domain_conf.h" +#include "storage_conf.h" #include "virtime.h" #include "virhostcpu.h" #include "virsocketaddr.h" --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 03:22:16 2024 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519637180389744.3063206475487; Mon, 26 Feb 2018 01:26:20 -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 0823D7FEBF; Mon, 26 Feb 2018 09:26:16 +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 AF9995D753; Mon, 26 Feb 2018 09:26:15 +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 4C44918033EC; Mon, 26 Feb 2018 09:26:15 +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 w1Q9QEPR016741 for ; Mon, 26 Feb 2018 04:26:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 270FD5DA2A; Mon, 26 Feb 2018 09:26:14 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 123A15D973 for ; Mon, 26 Feb 2018 09:26:10 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0ECEC049D49 for ; Mon, 26 Feb 2018 09:26:08 +0000 (UTC) Received: from msk-vpn.virtuozzo.com ([195.214.232.6] helo=dim-vz7.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.89) (envelope-from ) id 1eqF2s-0000Pc-Q2 for libvir-list@redhat.com; Mon, 26 Feb 2018 12:26:06 +0300 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Mon, 26 Feb 2018 12:25:51 +0300 Message-Id: <1519637151-828210-3-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1519637151-828210-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1519637151-828210-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 26 Feb 2018 09:26:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 26 Feb 2018 09:26:09 +0000 (UTC) for IP:'185.231.240.75' DOMAIN:'relay.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 185.231.240.75 relay.sw.ru 185.231.240.75 relay.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] vz: build fix: handle missing switch enum cases 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.25]); Mon, 26 Feb 2018 09:26:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Ensure all enum cases are listed in switch statements, or cast away enum type in places where we don't wish to cover all cases. Build is broken after 67966ad51 [1]. [1] m4: enforce that all enum cases are listed in switch statements Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- src/vz/vz_sdk.c | 16 ++++++++-------- src/vz/vz_utils.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 3d51067..a5b9f2d 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -1103,7 +1103,7 @@ prlsdkGetNetInfo(PRL_HANDLE netAdapter, virDomainNetD= efPtr net, bool isCt) pret =3D PrlVmDevNet_GetAdapterType(netAdapter, &type); prlsdkCheckRetGoto(pret, cleanup); =20 - switch (type) { + switch ((int)type) { case PNT_RTL: if (VIR_STRDUP(net->model, "rtl8139") < 0) goto cleanup; @@ -1695,10 +1695,10 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_= TYPE sdkType, int sdkIndex, return -1; } =20 - switch (sdkType) { + switch ((int)sdkType) { case PDE_OPTICAL_DISK: case PDE_HARD_DISK: - switch (sdkType) { + switch ((int)sdkType) { case PDE_OPTICAL_DISK: device =3D VIR_DOMAIN_DISK_DEVICE_CDROM; break; @@ -1810,7 +1810,7 @@ prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomain= DefPtr def) continue; } =20 - switch (sdkType) { + switch ((int)sdkType) { case PDE_OPTICAL_DISK: type =3D VIR_DOMAIN_BOOT_CDROM; break; @@ -2106,7 +2106,7 @@ prlsdkNewStateToEvent(VIRTUAL_MACHINE_STATE domainSta= te, /* We skip all intermediate states here, because * libvirt doesn't have correspoding event types for * them */ - switch (domainState) { + switch ((int)domainState) { case VMS_STOPPED: case VMS_MOUNTED: *lvEventType =3D VIR_DOMAIN_EVENT_STOPPED; @@ -2318,7 +2318,7 @@ prlsdkEventsHandler(PRL_HANDLE prlEvent, PRL_VOID_PTR= opaque) goto cleanup; } =20 - switch (prlEventType) { + switch ((int)prlEventType) { case PET_DSP_EVT_VM_STATE_CHANGED: prlsdkHandleVmStateEvent(driver, prlEvent, uuid); break; @@ -3891,7 +3891,7 @@ prlsdkSetBootOrderVm(PRL_HANDLE sdkdom, virDomainDefP= tr def) for (i =3D 0; i < def->os.nBootDevs; ++i) { virType =3D def->os.bootDevs[i]; =20 - switch (virType) { + switch ((int)virType) { case VIR_DOMAIN_BOOT_CDROM: sdkType =3D PDE_OPTICAL_DISK; break; @@ -3981,7 +3981,7 @@ prlsdkDoApplyConfig(vzDriverPtr driver, prlsdkCheckRetGoto(pret, error); VIR_FREE(mask); =20 - switch (def->os.arch) { + switch ((int)def->os.arch) { case VIR_ARCH_X86_64: pret =3D PrlVmCfg_SetCpuMode(sdkdom, PCM_CPU_MODE_64); break; diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index 770b499..6fb2716 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -500,7 +500,7 @@ vzCheckUnsupportedControllers(const virDomainDef *def, = vzCapabilitiesPtr vzCaps) int vzGetDefaultSCSIModel(vzDriverPtr driver, PRL_CLUSTERED_DEVICE_SUBTYPE *scsiModel) { - switch (driver->vzCaps.scsiControllerModel) { + switch ((int)driver->vzCaps.scsiControllerModel) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: *scsiModel =3D PCD_VIRTIO_SCSI; break; --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list