From nobody Thu Apr 25 16:41:07 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.zoho.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 1490630219167143.34261138118723; Mon, 27 Mar 2017 08:56:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B201688E60; Mon, 27 Mar 2017 15:56:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 85C2C17CF5; Mon, 27 Mar 2017 15:56:57 +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 56D844BB75; Mon, 27 Mar 2017 15:56:55 +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 v2RFusBB014954 for ; Mon, 27 Mar 2017 11:56:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 85D878867C; Mon, 27 Mar 2017 15:56:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F3838867B for ; Mon, 27 Mar 2017 15:56:52 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) (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 CDFCA22BA13 for ; Mon, 27 Mar 2017 15:56:51 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id h125so24815313lfe.0 for ; Mon, 27 Mar 2017 08:56:51 -0700 (PDT) Received: from kloomba.my.domain ([31.29.231.57]) by smtp.gmail.com with ESMTPSA id e124sm194228lfg.8.2017.03.27.08.56.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Mar 2017 08:56:49 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B201688E60 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B201688E60 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UPxPr1DY" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CDFCA22BA13 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bogorodskiy@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CDFCA22BA13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qKtszk4Luh703Zrbrzmc5kwJvIWEPkHG4bHo3J8nnhU=; b=UPxPr1DYxIDcpZeQu9+f3EwtDrAU9bHX26r9Ogo889JNW/Fndo+ZSBgwVf7fqMCopt zhVuLbT+Ze7s7za9lgV2oRB0BgNxX+QB8gZ3FW5JJGK0lK4dv+ypjjl9f1ENauJrepz2 sdTU72vLTo4IRJ3h8Xa1OZx5sfXIKdQj0f8e24qwFS+F3YCR/MHhbmOV1i5GLTNEiliL wtJXRA79zGThlr9fgeH6XtMRR8khc96KSvnMUEx/9t1AJjEdfBS4+YyDnEH7H1mTmuPB RGY/6rRQrDA2JD78/KK4TX0CHzg8SNq5IiBcRKDlWNMiqsFhVRkKdzEQ1B2Yp1EWJ6oC yncg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qKtszk4Luh703Zrbrzmc5kwJvIWEPkHG4bHo3J8nnhU=; b=unJhNktWuia/efjAt4A2z45Ylw0MwvnEaYodQxU3gldJwr2zEB4OLzibgwfLiUUsWN OAcH28drQiWmtL5nuva92lpNtH8NqSMLb0xmnvBYE1k1Z8bmfmurvz8R5vwa+DMgNgOU 8XIKxLG2hfvj27TAZwnDO+q+FzLE5CmoCJbE7yIrmv3ze+9VrqULfXnAqKRiajjJQVpi YB4a8LPYUxTnq8JeqPWIyzcSgrRqIVanQtfVnaHchVcnRUGBhXfJC4xIDc2bhyh6gcqp 7ifEqhplPHnMy5M4xwtYGwZ45fVumc+EId3eftj4g9ifSHOQb+cOiRjEFwHntE1m6wBD 6crw== X-Gm-Message-State: AFeK/H3UXc0TrCUHa53xS2R0KHAzjcCmO/s3hIdL3iVlgfwPu/oVgT/3m8y1ul6Lm+XUIw== X-Received: by 10.25.99.153 with SMTP id v25mr11189949lfi.170.1490630210342; Mon, 27 Mar 2017 08:56:50 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 19:56:44 +0400 Message-Id: <20170327155644.49165-1-bogorodskiy@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 27 Mar 2017 15:56:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 27 Mar 2017 15:56:52 +0000 (UTC) for IP:'209.85.215.53' DOMAIN:'mail-lf0-f53.google.com' HELO:'mail-lf0-f53.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.27 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.215.53 mail-lf0-f53.google.com 209.85.215.53 mail-lf0-f53.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH v2] virmdev: fix build on non-Linux 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 27 Mar 2017 15:56:58 +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" - Make virMediatedDeviceNew() stub args match its prototype - Fix typo: virRerportError -> virReportError - Move MDEV_SYSFS_DEVICES definition out of the #ifdef __linux__ block so we don't have to stub virMediatedDeviceGetSysfsPath() --- Changes from v1: instead of adding a stub for virMediatedDeviceGetSysfsPath= (), just unconditionally define MDEV_SYSFS_DEVICES as it makes things easier for the tests. src/util/virmdev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/util/virmdev.c b/src/util/virmdev.c index e924af3c1..2a1ade739 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -28,6 +28,8 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 +#define MDEV_SYSFS_DEVICES "/sys/bus/mdev/devices/" + VIR_LOG_INIT("util.mdev"); =20 struct _virMediatedDevice { @@ -68,7 +70,6 @@ virMediatedOnceInit(void) VIR_ONCE_GLOBAL_INIT(virMediated) =20 #ifdef __linux__ -# define MDEV_SYSFS_DEVICES "/sys/bus/mdev/devices/" =20 static int virMediatedDeviceGetSysfsDeviceAPI(virMediatedDevicePtr dev, @@ -173,12 +174,12 @@ virMediatedDeviceNew(const char *uuidstr, virMediated= DeviceModelType model) #else =20 virMediatedDevicePtr -virMediatedDeviceNew(virPCIDeviceAddressPtr pciaddr ATTRIBUTE_UNUSED, - const char *uuidstr ATTRIBUTE_UNUSED) +virMediatedDeviceNew(const char *uuidstr ATTRIBUTE_UNUSED, + virMediatedDeviceModelType model ATTRIBUTE_UNUSED) { - virRerportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("mediated devices are not supported on non-linux " - "platforms")); + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("mediated devices are not supported on non-linux " + "platforms")); return NULL; } =20 --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list