From nobody Mon May 6 17:42:50 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 1490629312570205.34639480630085; Mon, 27 Mar 2017 08:41:52 -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 39E992E605F; Mon, 27 Mar 2017 15:41:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05D397D529; Mon, 27 Mar 2017 15:41:51 +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 B1C314BB75; Mon, 27 Mar 2017 15:41:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RFfngi012256 for ; Mon, 27 Mar 2017 11:41:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id BBEDB81C09; Mon, 27 Mar 2017 15:41:49 +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 B2EDB81C05 for ; Mon, 27 Mar 2017 15:41:47 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (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 BFA98C1C5DE3 for ; Mon, 27 Mar 2017 15:41:46 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id j90so24450190lfk.2 for ; Mon, 27 Mar 2017 08:41:46 -0700 (PDT) Received: from kloomba.my.domain ([31.29.231.57]) by smtp.gmail.com with ESMTPSA id 187sm183224ljf.32.2017.03.27.08.41.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Mar 2017 08:41:44 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 39E992E605F Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx05.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 39E992E605F Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AQbf4xVv" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BFA98C1C5DE3 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bogorodskiy@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BFA98C1C5DE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qlEGppFkhrahZCcPq/q01rFzmjT/FGj77OZ35cQw1n8=; b=AQbf4xVv+OfxTBX2OawyMVmQaS1BDJPCuWyBLE+a54QHw/yVKNdfznDhnQ7NPXVrkI lJ0dR7giscNAbMjyXz0S3oa9xf+Ddh1WvDikwbpbW0NSXj8x/fwgFS3kP47Q5FRQQBSK gjzDic5CMiYM7LGFEKTbgsBBLnKfqnR094YhJZUOJhAGpzLrBQR+aiVzoxBbUzbZA6RU fTGshTWhPCRH/atUm6pAG3mMDaYg6233davT98Y/fipGBnokXPjag80gS1STfxL6P1WV 8TJ4XmT+CDJ1JeGGy0JxMcRErr7ix/3BaUmFZVGLX7UtrfUHGqHF3ksa2k4pYLDuECH+ 2xkQ== 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=qlEGppFkhrahZCcPq/q01rFzmjT/FGj77OZ35cQw1n8=; b=SROB2JIe79cgRndFbfQyn+xrwl8SAzNeR5XJetsJAPDtEoPxWRo7xOkipKycuSALql XO0ktqMZweACDYnWqb6SIJQ6euORSxLaY78FnOplexmZ8rTRB8kdbDSMeaUCJ16+5DXC C+E333+6Ryr0/f5fJVOvao+7sieywRr+HoajAMCu9qlDpat6QeMirKbRda6FK1f1xMZ3 Ahh378xIx9x5kXgAF7xkwPbVQmVFZxnISEcA41UfmeCrOrTJ1PIB45BVeuS8P0vo3/5o LeMSnF4PwONe6qRywl3Azl0dMKsArecVtzo2+ZLqXmCdRvA8wM2nj/YgOoAlUNA88jwS TOxA== X-Gm-Message-State: AFeK/H1JBNNLQs2a43TIB3JGvLQ/2Jq2et8WWGvE+m36fE6MTgA+j19B6T/rLJU2MKcw9w== X-Received: by 10.25.22.101 with SMTP id m98mr8604189lfi.176.1490629304996; Mon, 27 Mar 2017 08:41:44 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 19:41:34 +0400 Message-Id: <20170327154134.56066-1-bogorodskiy@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Mar 2017 15:41:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Mar 2017 15:41:47 +0000 (UTC) for IP:'209.85.215.52' DOMAIN:'mail-lf0-f52.google.com' HELO:'mail-lf0-f52.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.77 (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, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.215.52 mail-lf0-f52.google.com 209.85.215.52 mail-lf0-f52.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH] 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.29]); Mon, 27 Mar 2017 15:41:51 +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 virMediatedDeviceGetSysfsPath() into #ifdef __linux__ block as it uses MDEV_SYSFS_DEVICES, and a stub for it --- I'm not pushing this one too, until I get a completely clean build. src/util/virmdev.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/util/virmdev.c b/src/util/virmdev.c index e924af3c1..e49ea18e5 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -170,15 +170,34 @@ virMediatedDeviceNew(const char *uuidstr, virMediated= DeviceModelType model) return ret; } =20 + +char * +virMediatedDeviceGetSysfsPath(const char *uuidstr) +{ + char *ret =3D NULL; + + ignore_value(virAsprintf(&ret, MDEV_SYSFS_DEVICES "%s", uuidstr)); + return ret; +} + #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; +} + +char * +virMediatedDeviceGetSysfsPath(const char *uuidstr ATTRIBUTE_UNUSED) +{ + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("mediated devices are not supported on non-linux " + "platforms")); return NULL; } =20 @@ -423,16 +442,6 @@ virMediatedDeviceIsUsed(virMediatedDevicePtr dev, } =20 =20 -char * -virMediatedDeviceGetSysfsPath(const char *uuidstr) -{ - char *ret =3D NULL; - - ignore_value(virAsprintf(&ret, MDEV_SYSFS_DEVICES "%s", uuidstr)); - return ret; -} - - int virMediatedDeviceListMarkDevices(virMediatedDeviceListPtr dst, virMediatedDeviceListPtr src, --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list