From nobody Mon Feb 9 00:07:32 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542962629767538.2149558361392; Fri, 23 Nov 2018 00:43:49 -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 655F530001EA; Fri, 23 Nov 2018 08:43:45 +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 BD7145C21E; Fri, 23 Nov 2018 08:43:44 +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 AA142181B9E4; Fri, 23 Nov 2018 08:43:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAN8hfBE003771 for ; Fri, 23 Nov 2018 03:43:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id E084917B26; Fri, 23 Nov 2018 08:43:41 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6556D17797 for ; Fri, 23 Nov 2018 08:43:41 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Fri, 23 Nov 2018 09:43:19 +0100 Message-Id: <8dfec2b24ada3de372549717a8bc019f89c0d5f3.1542960893.git.mprivozn@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/18] security: Unify header conditionals 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.42]); Fri, 23 Nov 2018 08:43:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" To avoid including a header file twice the following pattern is used: #ifndef __SOMETHING__ # define __SOMETHING__ where __SOMETHING__ should correspond to the header file name. However, some of our header files break that pattern. Signed-off-by: Michal Privoznik --- src/security/security_apparmor.h | 6 +++--- src/security/security_dac.h | 6 +++--- src/security/security_driver.h | 6 +++--- src/security/security_manager.h | 6 +++--- src/security/security_nop.h | 6 +++--- src/security/security_selinux.h | 6 +++--- src/security/security_stack.h | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/security/security_apparmor.h b/src/security/security_appar= mor.h index 7872588f64..6b454d1b5c 100644 --- a/src/security/security_apparmor.h +++ b/src/security/security_apparmor.h @@ -19,8 +19,8 @@ * Jamie Strandboge * */ -#ifndef __VIR_SECURITY_APPARMOR_H__ -# define __VIR_SECURITY_APPARMOR_H__ +#ifndef __SECURITY_APPARMOR_H__ +# define __SECURITY_APPARMOR_H__ =20 # include "security_driver.h" =20 @@ -30,4 +30,4 @@ extern virSecurityDriver virAppArmorSecurityDriver; # define PROFILE_NAME_SIZE 8 + VIR_UUID_STRING_BUFLEN /* AA_PREFIX + uuid= */ # define MAX_FILE_LEN (1024*1024*10) /* 10MB limit for sanity check= */ =20 -#endif /* __VIR_SECURITY_APPARMOR_H__ */ +#endif /* __SECURITY_APPARMOR_H__ */ diff --git a/src/security/security_dac.h b/src/security/security_dac.h index 97681c9610..8007bde000 100644 --- a/src/security/security_dac.h +++ b/src/security/security_dac.h @@ -20,8 +20,8 @@ =20 #include "security_driver.h" =20 -#ifndef __VIR_SECURITY_DAC -# define __VIR_SECURITY_DAC +#ifndef __SECURITY_DAC__ +# define __SECURITY_DAC__ =20 extern virSecurityDriver virSecurityDriverDAC; =20 @@ -38,4 +38,4 @@ void virSecurityDACSetMountNamespace(virSecurityManagerPt= r mgr, void virSecurityDACSetChownCallback(virSecurityManagerPtr mgr, virSecurityManagerDACChownCallback cho= wnCallback); =20 -#endif /* __VIR_SECURITY_DAC */ +#endif /* __SECURITY_DAC__ */ diff --git a/src/security/security_driver.h b/src/security/security_driver.h index cd221f1c78..25d49bb0f4 100644 --- a/src/security/security_driver.h +++ b/src/security/security_driver.h @@ -19,8 +19,8 @@ * James Morris * */ -#ifndef __VIR_SECURITY_H__ -# define __VIR_SECURITY_H__ +#ifndef __SECURITY_DRIVER_H__ +# define __SECURITY_DRIVER_H__ =20 # include "internal.h" # include "domain_conf.h" @@ -226,4 +226,4 @@ struct _virSecurityDriver { virSecurityDriverPtr virSecurityDriverLookup(const char *name, const char *virtDriver); =20 -#endif /* __VIR_SECURITY_H__ */ +#endif /* __SECURITY_DRIVER_H__ */ diff --git a/src/security/security_manager.h b/src/security/security_manage= r.h index 7e82304689..139b70ec10 100644 --- a/src/security/security_manager.h +++ b/src/security/security_manager.h @@ -20,8 +20,8 @@ * Author: Daniel P. Berrange */ =20 -#ifndef VIR_SECURITY_MANAGER_H__ -# define VIR_SECURITY_MANAGER_H__ +#ifndef __SECURITY_MANAGER_H__ +# define __SECURITY_MANAGER_H__ =20 # include "domain_conf.h" # include "vircommand.h" @@ -210,4 +210,4 @@ void virSecurityManagerMetadataUnlock(virSecurityManagerPtr mgr, virSecurityManagerMetadataLockStatePtr *s= tate); =20 -#endif /* VIR_SECURITY_MANAGER_H__ */ +#endif /* __SECURITY_MANAGER_H__ */ diff --git a/src/security/security_nop.h b/src/security/security_nop.h index 514b339467..7b2ded2292 100644 --- a/src/security/security_nop.h +++ b/src/security/security_nop.h @@ -17,11 +17,11 @@ * */ =20 -#ifndef __VIR_SECURITY_NOP_H__ -# define __VIR_SECURITY_NOP_H__ +#ifndef __SECURITY_NOP_H__ +# define __SECURITY_NOP_H__ =20 # include "security_driver.h" =20 extern virSecurityDriver virSecurityDriverNop; =20 -#endif /* __VIR_SECURITY_NOP_H__ */ +#endif /* __SECURITY_NOP_H__ */ diff --git a/src/security/security_selinux.h b/src/security/security_selinu= x.h index 1700d8c661..11b62acb52 100644 --- a/src/security/security_selinux.h +++ b/src/security/security_selinux.h @@ -19,9 +19,9 @@ * James Morris * */ -#ifndef __VIR_SECURITY_SELINUX_H__ -# define __VIR_SECURITY_SELINUX_H__ +#ifndef __SECURITY_SELINUX_H__ +# define __SECURITY_SELINUX_H__ =20 extern virSecurityDriver virSecurityDriverSELinux; =20 -#endif /* __VIR_SECURITY_SELINUX_H__ */ +#endif /* __SECURITY_SELINUX_H__ */ diff --git a/src/security/security_stack.h b/src/security/security_stack.h index b38f9a9481..7e6ab3d93e 100644 --- a/src/security/security_stack.h +++ b/src/security/security_stack.h @@ -20,8 +20,8 @@ =20 #include "security_driver.h" =20 -#ifndef __VIR_SECURITY_STACK -# define __VIR_SECURITY_STACK +#ifndef __SECURITY_STACK__ +# define __SECURITY_STACK__ =20 extern virSecurityDriver virSecurityDriverStack; =20 @@ -35,4 +35,4 @@ virSecurityStackGetPrimary(virSecurityManagerPtr mgr); virSecurityManagerPtr* virSecurityStackGetNested(virSecurityManagerPtr mgr); =20 -#endif /* __VIR_SECURITY_STACK */ +#endif /* __SECURITY_STACK__ */ --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list