From nobody Tue Feb 10 04:03:06 2026 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560874541; cv=none; d=zoho.com; s=zohoarc; b=kC4olAK1AUWtdLUKMxpc0mLYxh6oy4vDeqQnYmZnuylTSFaEfQ5U0xfndglWaYlKKnWFDCVRjLTCZptNgz2ePdX1tTO477mMpQo4cOYfNN3iYY0AD/c6UHCm79xAfO01zeLdFk7WKyPFhDPM6sk/uQZ1Tzp/luaplJD9GneigQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560874541; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ga/ebLXgxJ1ymbEDBCgDXdAjPKiNaQW+EEj4mYgy878=; b=h1/9Jn4IoJlG61oyJsaBnq8R0f7ikvNbUWMEm0UyNPQF87TWeqtogbKeOYsTZElZ9EfsXt01g+STdTZwSIp8hKpFVNfJdAvWckKLYCIoFCMMUoA+zZulWb3dHqXef8sxE/M0HNgylZC1oChIvkOoG0M8805RPGmEgA1sefwheGE= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560874541949358.1546450081621; Tue, 18 Jun 2019 09:15:41 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0951E3162906; Tue, 18 Jun 2019 16:15:38 +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 CB8DE5F5B8; Tue, 18 Jun 2019 16:15:37 +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 93A951806B23; Tue, 18 Jun 2019 16:15:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5IGDVFU024264 for ; Tue, 18 Jun 2019 12:13:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8ACC884EF; Tue, 18 Jun 2019 16:13:31 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-198.phx2.redhat.com [10.3.117.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5968E60FAB for ; Tue, 18 Jun 2019 16:13:31 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Tue, 18 Jun 2019 11:12:52 -0500 Message-Id: <20190618161316.1722-23-jjongsma@redhat.com> In-Reply-To: <20190618161316.1722-1-jjongsma@redhat.com> References: <20190618161316.1722-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 22/46] util: host: use #pragma once in 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 18 Jun 2019 16:15:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/util/virhostcpu.h | 17 +++++++---------- src/util/virhostcpupriv.h | 11 ++++------- src/util/virhostdev.h | 19 ++++++++----------- src/util/virhostmem.h | 7 ++----- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h index b822bc11a8..2ba79b97a5 100644 --- a/src/util/virhostcpu.h +++ b/src/util/virhostcpu.h @@ -19,13 +19,12 @@ * . */ =20 -#ifndef LIBVIRT_VIRHOSTCPU_H -# define LIBVIRT_VIRHOSTCPU_H +#pragma once =20 -# include "internal.h" -# include "virarch.h" -# include "virbitmap.h" -# include "virenum.h" +#include "internal.h" +#include "virarch.h" +#include "virbitmap.h" +#include "virenum.h" =20 =20 typedef struct _virHostCPUTscInfo virHostCPUTscInfo; @@ -64,12 +63,12 @@ int virHostCPUStatsAssign(virNodeCPUStatsPtr param, const char *name, unsigned long long value); =20 -# ifdef __linux__ +#ifdef __linux__ int virHostCPUGetSocket(unsigned int cpu, unsigned int *socket); int virHostCPUGetCore(unsigned int cpu, unsigned int *core); =20 virBitmapPtr virHostCPUGetSiblingsList(unsigned int cpu); -# endif +#endif =20 int virHostCPUGetOnline(unsigned int cpu, bool *online); =20 @@ -79,5 +78,3 @@ int virHostCPUGetMSR(unsigned long index, uint64_t *msr); =20 virHostCPUTscInfoPtr virHostCPUGetTscInfo(void); - -#endif /* LIBVIRT_VIRHOSTCPU_H */ diff --git a/src/util/virhostcpupriv.h b/src/util/virhostcpupriv.h index 980d4cb1fa..afb415f9ea 100644 --- a/src/util/virhostcpupriv.h +++ b/src/util/virhostcpupriv.h @@ -23,12 +23,11 @@ # error "virhostcpupriv.h may only be included by virhostcpu.c or test sui= tes" #endif /* LIBVIRT_VIRHOSTCPUPRIV_H_ALLOW */ =20 -#ifndef LIBVIRT_VIRHOSTCPUPRIV_H -# define LIBVIRT_VIRHOSTCPUPRIV_H +#pragma once =20 -# include "virhostcpu.h" +#include "virhostcpu.h" =20 -# ifdef __linux__ +#ifdef __linux__ int virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, virArch arch, unsigned int *cpus, @@ -42,6 +41,4 @@ int virHostCPUGetStatsLinux(FILE *procstat, int cpuNum, virNodeCPUStatsPtr params, int *nparams); -# endif - -#endif /* LIBVIRT_VIRHOSTCPUPRIV_H */ +#endif diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 7263f320a2..88501e2743 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -19,17 +19,16 @@ * . */ =20 -#ifndef LIBVIRT_VIRHOSTDEV_H -# define LIBVIRT_VIRHOSTDEV_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 -# include "virpci.h" -# include "virusb.h" -# include "virscsi.h" -# include "virscsivhost.h" -# include "conf/domain_conf.h" -# include "virmdev.h" +#include "virpci.h" +#include "virusb.h" +#include "virscsi.h" +#include "virscsivhost.h" +#include "conf/domain_conf.h" +#include "virmdev.h" =20 typedef enum { VIR_HOSTDEV_STRICT_ACS_CHECK =3D (1 << 0), /* strict acs check */ @@ -202,5 +201,3 @@ int virHostdevPCINodeDeviceReAttach(virHostdevManagerPt= r mgr, int virHostdevPCINodeDeviceReset(virHostdevManagerPtr mgr, virPCIDevicePtr pci) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - -#endif /* LIBVIRT_VIRHOSTDEV_H */ diff --git a/src/util/virhostmem.h b/src/util/virhostmem.h index cba1732d8d..1369829807 100644 --- a/src/util/virhostmem.h +++ b/src/util/virhostmem.h @@ -19,10 +19,9 @@ * . */ =20 -#ifndef LIBVIRT_VIRHOSTMEM_H -# define LIBVIRT_VIRHOSTMEM_H +#pragma once =20 -# include "internal.h" +#include "internal.h" =20 int virHostMemGetStats(int cellNum, virNodeMemoryStatsPtr params, @@ -54,5 +53,3 @@ int virHostMemAllocPages(unsigned int npages, int startCell, unsigned int cellCount, bool add); - -#endif /* LIBVIRT_VIRHOSTMEM_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list