From nobody Thu May 2 17:10:56 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; 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 1493276547824218.08449118061935; Thu, 27 Apr 2017 00:02:27 -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 52713C04B950; Thu, 27 Apr 2017 07:02:26 +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 330BB8884F; Thu, 27 Apr 2017 07:02:26 +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 D7B2018523D3; Thu, 27 Apr 2017 07:02:25 +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 v3R727eQ007651 for ; Thu, 27 Apr 2017 03:02:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9867A93406; Thu, 27 Apr 2017 07:02:07 +0000 (UTC) Received: from moe.brq.redhat.com (dhcp129-131.brq.redhat.com [10.34.129.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F8579341F for ; Thu, 27 Apr 2017 07:02:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 52713C04B950 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 52713C04B950 From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 27 Apr 2017 09:01:57 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] examples: Properly include getopt.h 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.31]); Thu, 27 Apr 2017 07:02:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In the admin/logging.c example, the getopt() function is used but without proper #include. It relies on unistd.h to subsequently include getopt.h. This is not necessarily always the case. Also, opterr is not needed and actually not used anywhere else in our code. Signed-off-by: Michal Privoznik --- examples/admin/logging.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/admin/logging.c b/examples/admin/logging.c index 648d7a6..de258c2 100644 --- a/examples/admin/logging.c +++ b/examples/admin/logging.c @@ -1,11 +1,12 @@ -#include -#include -#include +#include +#include +#include =20 #include "config.h" -#include -#include -#include +#include +#include +#include +#include =20 static void printHelp(const char *argv0) { @@ -31,7 +32,6 @@ int main(int argc, char **argv) const char *set_filters =3D NULL; =20 ret =3D c =3D -1; - opterr =3D 0; =20 while ((c =3D getopt(argc, argv, ":hpo:f:")) > 0) { switch (c) { --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 17:10:56 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; 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 1493276533517728.0643030703883; Thu, 27 Apr 2017 00:02:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4089811A9; Thu, 27 Apr 2017 07:02:11 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9936293406; Thu, 27 Apr 2017 07:02:11 +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 E3C305EC63; Thu, 27 Apr 2017 07:02:10 +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 v3R728a3007659 for ; Thu, 27 Apr 2017 03:02:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 843889341F; Thu, 27 Apr 2017 07:02:08 +0000 (UTC) Received: from moe.brq.redhat.com (dhcp129-131.brq.redhat.com [10.34.129.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFEAA93406 for ; Thu, 27 Apr 2017 07:02:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D4089811A9 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.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 D4089811A9 From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 27 Apr 2017 09:01:58 +0200 Message-Id: <025d55176468ad8e5284602945eacd209f656de1.1493276478.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/4] vmwarevertest: drop VIR_FROM_THIS definition 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 27 Apr 2017 07:02:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Firstly, this definition is in a c99 comment, secondly it is not needed as VIR_FROM_THIS is defined from vmware/vmware_conf.h. Signed-off-by: Michal Privoznik --- tests/vmwarevertest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/vmwarevertest.c b/tests/vmwarevertest.c index 3dbe08b..e0e36fe 100644 --- a/tests/vmwarevertest.c +++ b/tests/vmwarevertest.c @@ -27,8 +27,6 @@ =20 # include "vmware/vmware_conf.h" =20 -//# define VIR_FROM_THIS VIR_FROM_NONE - struct testInfo { const char *vmware_type; const char *name; --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 17:10:56 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; 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 1493276533500283.8712160960588; Thu, 27 Apr 2017 00:02:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 089ADC04BD22; Thu, 27 Apr 2017 07:02:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9958493414; Thu, 27 Apr 2017 07:02:11 +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 A63185EC62; Thu, 27 Apr 2017 07:02:10 +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 v3R729w5007666 for ; Thu, 27 Apr 2017 03:02:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 70AF393414; Thu, 27 Apr 2017 07:02:09 +0000 (UTC) Received: from moe.brq.redhat.com (dhcp129-131.brq.redhat.com [10.34.129.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBF4A93406 for ; Thu, 27 Apr 2017 07:02:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 089ADC04BD22 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 089ADC04BD22 From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 27 Apr 2017 09:01:59 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] lib: Fix c99 style comments 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 27 Apr 2017 07:02:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We prefer c89 style of comments. Signed-off-by: Michal Privoznik --- examples/openauth/openauth.c | 2 +- src/lxc/lxc_controller.c | 2 +- src/remote/remote_driver.c | 2 +- src/rpc/virnetservermdns.c | 2 +- src/security/security_stack.c | 8 ++++---- src/uml/uml_conf.c | 2 +- src/util/virhostcpu.c | 4 ++-- src/util/virhostmem.c | 4 ++-- src/vbox/vbox_snapshot_conf.c | 2 +- tests/eventtest.c | 2 +- tests/virhostcpumock.c | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/openauth/openauth.c b/examples/openauth/openauth.c index 7a8254b..eef46d5 100644 --- a/examples/openauth/openauth.c +++ b/examples/openauth/openauth.c @@ -216,7 +216,7 @@ static virConnectAuth auth =3D { credTypes, sizeof(credTypes) / sizeof(int), authCallback, - NULL, // cbdata will be initialized in main + NULL, /* cbdata will be initialized in main */ }; =20 =20 diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 88ba8aa..1b9d215 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1800,7 +1800,7 @@ virLXCControllerSetupHostdevCaps(virDomainDefPtr vmDe= f, securityDriver); =20 case VIR_DOMAIN_HOSTDEV_CAPS_TYPE_NET: - return 0; // case is handled in virLXCControllerMoveInterfaces + return 0; /* case is handled in virLXCControllerMoveInterfaces */ =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 1242bd6..77250ea 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1145,7 +1145,7 @@ doRemoteOpen(virConnectPtr conn, =20 if (!(priv->closeCallback =3D virNewConnectCloseCallbackData())) goto failed; - // ref on behalf of netclient + /* ref on behalf of netclient */ virObjectRef(priv->closeCallback); virNetClientSetCloseCallback(priv->client, remoteClientCloseFunc, diff --git a/src/rpc/virnetservermdns.c b/src/rpc/virnetservermdns.c index 7f12a29..8d7df24 100644 --- a/src/rpc/virnetservermdns.c +++ b/src/rpc/virnetservermdns.c @@ -128,7 +128,7 @@ static void virNetServerMDNSGroupCallback(AvahiEntryGro= up *g ATTRIBUTE_UNUSED, avahi_strerror(avahi_client_errno(group->mdns->client))); =20 /* Some kind of failure happened while we were registering our ser= vices */ - //avahi_simple_poll_quit(simple_poll); + /* avahi_simple_poll_quit(simple_poll); */ break; =20 case AVAHI_ENTRY_GROUP_UNCOMMITED: diff --git a/src/security/security_stack.c b/src/security/security_stack.c index b02ee18..9a1a7b3 100644 --- a/src/security/security_stack.c +++ b/src/security/security_stack.c @@ -210,7 +210,7 @@ virSecurityStackGenLabel(virSecurityManagerPtr mgr, if (virSecurityManagerGenLabel(virSecurityStackGetPrimary(mgr), vm) < = 0) rc =3D -1; =20 -// TODO +/* TODO */ #if 0 /* We don't allow secondary drivers to generate labels. * This may have to change in the future, but requires @@ -235,7 +235,7 @@ virSecurityStackReleaseLabel(virSecurityManagerPtr mgr, if (virSecurityManagerReleaseLabel(virSecurityStackGetPrimary(mgr), vm= ) < 0) rc =3D -1; =20 -// TODO +/* TODO */ #if 0 /* XXX See note in GenLabel */ if (virSecurityManagerReleaseLabel(priv->secondary, vm) < 0) @@ -255,7 +255,7 @@ virSecurityStackReserveLabel(virSecurityManagerPtr mgr, =20 if (virSecurityManagerReserveLabel(virSecurityStackGetPrimary(mgr), vm= , pid) < 0) rc =3D -1; -// TODO +/* TODO */ #if 0 /* XXX See note in GenLabel */ if (virSecurityManagerReserveLabel(priv->secondary, vm, pid) < 0) @@ -460,7 +460,7 @@ virSecurityStackGetProcessLabel(virSecurityManagerPtr m= gr, { int rc =3D 0; =20 -// TODO +/* TODO */ #if 0 if (virSecurityManagerGetProcessLabel(priv->secondary, vm, pid, seclab= el) < 0) rc =3D -1; diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c index bdef783..d223af0 100644 --- a/src/uml/uml_conf.c +++ b/src/uml/uml_conf.c @@ -399,7 +399,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn, =20 virCommandAddEnvPassCommon(cmd); =20 - //virCommandAddArgPair(cmd, "con0", "fd:0,fd:1"); + /* virCommandAddArgPair(cmd, "con0", "fd:0,fd:1"); */ virCommandAddArgFormat(cmd, "mem=3D%lluK", vm->def->mem.cur_balloon); virCommandAddArgPair(cmd, "umid", vm->def->name); virCommandAddArgPair(cmd, "uml_dir", driver->monitorDir); diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index a660e3f..8397307 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -795,8 +795,8 @@ virHostCPUGetStatsLinux(FILE *procstat, =20 if (STRPREFIX(buf, cpu_header)) { /* aka logical CPU time */ if (sscanf(buf, - "%*s %llu %llu %llu %llu %llu" // user ~ iowait - "%llu %llu %llu %llu %llu", // irq ~ guest_nice + "%*s %llu %llu %llu %llu %llu" /* user ~ iowait */ + "%llu %llu %llu %llu %llu", /* irq ~ guest_nice= */ &usr, &ni, &sys, &idle, &iowait, &irq, &softirq, &steal, &guest, &guest_nice) < 4) { continue; diff --git a/src/util/virhostmem.c b/src/util/virhostmem.c index 2ac90a0..a9ba278 100644 --- a/src/util/virhostmem.c +++ b/src/util/virhostmem.c @@ -158,8 +158,8 @@ virHostMemGetStatsLinux(FILE *meminfo, char meminfo_hdr[VIR_NODE_MEMORY_STATS_FIELD_LENGTH]; unsigned long val; struct field_conv { - const char *meminfo_hdr; // meminfo header - const char *field; // MemoryStats field name + const char *meminfo_hdr; /* meminfo header */ + const char *field; /* MemoryStats field name */ } field_conv[] =3D { {"MemTotal:", VIR_NODE_MEMORY_STATS_TOTAL}, {"MemFree:", VIR_NODE_MEMORY_STATS_FREE}, diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index 8bf7ef3..c3b2855 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -958,7 +958,7 @@ virVBoxSnapshotConfRemoveHardDisk(virVBoxSnapshotConfMe= diaRegistryPtr mediaRegis goto cleanup; } if (hardDisk->parent =3D=3D NULL) { - //it means that the hard disk is in 'root' + /* it means that the hard disk is in 'root' */ for (i =3D 0; i < mediaRegistry->ndisks; i++) { if (hardDisk =3D=3D mediaRegistry->disks[i]) break; diff --git a/tests/eventtest.c b/tests/eventtest.c index ea47fb0..0c1ec71 100644 --- a/tests/eventtest.c +++ b/tests/eventtest.c @@ -523,7 +523,7 @@ mymain(void) if (finishJob("Write duplicate", 1, -1) !=3D EXIT_SUCCESS) return EXIT_FAILURE; =20 - //pthread_kill(eventThread, SIGTERM); + /* pthread_kill(eventThread, SIGTERM); */ =20 return EXIT_SUCCESS; } diff --git a/tests/virhostcpumock.c b/tests/virhostcpumock.c index 00d10f1..48147b2 100644 --- a/tests/virhostcpumock.c +++ b/tests/virhostcpumock.c @@ -26,7 +26,7 @@ virHostCPUGetThreadsPerSubcore(virArch arch) { int threads_per_subcore =3D 0; =20 - // Emulate SMT=3D8 on POWER hardware + /* Emulate SMT=3D8 on POWER hardware */ if (ARCH_IS_PPC64(arch)) threads_per_subcore =3D 8; =20 --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 17:10:56 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; 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 1493276547996648.3957735389957; Thu, 27 Apr 2017 00:02:27 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60943811AC; Thu, 27 Apr 2017 07:02:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 373DE88D85; Thu, 27 Apr 2017 07:02:26 +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 E2ACD5EC6B; Thu, 27 Apr 2017 07:02:25 +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 v3R72AMg007671 for ; Thu, 27 Apr 2017 03:02:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5ED0393414; Thu, 27 Apr 2017 07:02:10 +0000 (UTC) Received: from moe.brq.redhat.com (dhcp129-131.brq.redhat.com [10.34.129.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA65093406 for ; Thu, 27 Apr 2017 07:02:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 60943811AC Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.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 60943811AC From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 27 Apr 2017 09:02:00 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] cpu: Avoid c99 style of assembler 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 27 Apr 2017 07:02:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In c89 - the standard we claim to support - there is no asm() rather than __asm__(). Switch from the former to the latter. Signed-off-by: Michal Privoznik --- src/cpu/cpu_ppc64.c | 4 ++-- src/cpu/cpu_x86.c | 44 ++++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index f64592b..5d65929 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -732,8 +732,8 @@ virCPUppc64GetHost(virCPUDefPtr cpu, data->len =3D 1; =20 #if defined(__powerpc__) || defined(__powerpc64__) - asm("mfpvr %0" - : "=3Dr" (data->pvr[0].value)); + __asm__("mfpvr %0" + : "=3Dr" (data->pvr[0].value)); #endif data->pvr[0].mask =3D 0xfffffffful; =20 diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 53359ff..c971aa3 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -2085,32 +2085,32 @@ static inline void cpuidCall(virCPUx86CPUID *cpuid) { # if __x86_64__ - asm("xor %%ebx, %%ebx;" /* clear the other registers as some cpuid */ - "xor %%edx, %%edx;" /* functions may use them as additional argume= nts */ - "cpuid;" - : "=3Da" (cpuid->eax), - "=3Db" (cpuid->ebx), - "=3Dc" (cpuid->ecx), - "=3Dd" (cpuid->edx) - : "a" (cpuid->eax_in), - "c" (cpuid->ecx_in)); + __asm__("xor %%ebx, %%ebx;" /* clear the other registers as some cpuid= */ + "xor %%edx, %%edx;" /* functions may use them as additional ar= guments */ + "cpuid;" + : "=3Da" (cpuid->eax), + "=3Db" (cpuid->ebx), + "=3Dc" (cpuid->ecx), + "=3Dd" (cpuid->edx) + : "a" (cpuid->eax_in), + "c" (cpuid->ecx_in)); # else /* we need to avoid direct use of ebx for CPUID output as it is used * for global offset table on i386 with -fPIC */ - asm("push %%ebx;" - "xor %%ebx, %%ebx;" /* clear the other registers as some cpuid */ - "xor %%edx, %%edx;" /* functions may use them as additional argume= nts */ - "cpuid;" - "mov %%ebx, %1;" - "pop %%ebx;" - : "=3Da" (cpuid->eax), - "=3Dr" (cpuid->ebx), - "=3Dc" (cpuid->ecx), - "=3Dd" (cpuid->edx) - : "a" (cpuid->eax_in), - "c" (cpuid->ecx_in) - : "cc"); + __asm__("push %%ebx;" + "xor %%ebx, %%ebx;" /* clear the other registers as some cpuid= */ + "xor %%edx, %%edx;" /* functions may use them as additional ar= guments */ + "cpuid;" + "mov %%ebx, %1;" + "pop %%ebx;" + : "=3Da" (cpuid->eax), + "=3Dr" (cpuid->ebx), + "=3Dc" (cpuid->ecx), + "=3Dd" (cpuid->edx) + : "a" (cpuid->eax_in), + "c" (cpuid->ecx_in) + : "cc"); # endif } =20 --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list