Update header guards bases on new coding style
Subsystems (7)
PATCH v2 19/19 xen: Update header guards - XSM/Flask
In reply to Frediano ZiglioUpdated headers related to XSM/Flask.
--- xen/include/xsm/dummy.h | 6 +++--- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/flask/include/avc.h | 6 +++--- xen/xsm/flask/include/avc_ss.h | 6 +++--- xen/xsm/flask/include/conditional.h | 4 ++-- xen/xsm/flask/include/objsec.h | 6 +++--- xen/xsm/flask/include/security.h | 6 +++--- xen/xsm/flask/private.h | 6 +++--- xen/xsm/flask/ss/avtab.h | 6 +++--- xen/xsm/flask/ss/conditional.h | 6 +++--- xen/xsm/flask/ss/constraint.h | 6 +++--- xen/xsm/flask/ss/context.h | 6 +++--- xen/xsm/flask/ss/ebitmap.h | 6 +++--- xen/xsm/flask/ss/hashtab.h | 4 ++-- xen/xsm/flask/ss/mls.h | 4 ++-- xen/xsm/flask/ss/mls_types.h | 6 +++--- xen/xsm/flask/ss/policydb.h | 6 +++--- xen/xsm/flask/ss/services.h | 6 +++--- xen/xsm/flask/ss/sidtab.h | 6 +++--- xen/xsm/flask/ss/symtab.h | 6 +++--- 20 files changed, 56 insertions(+), 56 deletions(-)
xen/include/xsm/dummy.h +3 -3
@@ -15,8 +15,8 @@* value of action. */ -#ifndef __XEN_XSM_DUMMY_H__ -#define __XEN_XSM_DUMMY_H__ +#ifndef XSM__DUMMY_H +#define XSM__DUMMY_H #include <xen/sched.h> #include <xsm/xsm.h>
@@ -847,4 +847,4 @@ static XSM_INLINE int cf_check xsm_domain_resource_map( return xsm_default_action(action, current->domain, d); } -#endif /* __XEN_XSM_DUMMY_H__ */ +#endif /* XSM__DUMMY_H */
xen/include/xsm/xsm.h +2 -2
@@ -12,8 +12,8 @@* as published by the Free Software Foundation. */ -#ifndef __XSM_H__ -#define __XSM_H__ +#ifndef XSM__XSM_H +#define XSM__XSM_H #include <xen/alternative-call.h> #include <xen/sched.h>
xen/xsm/flask/include/avc.h +3 -3
@@ -6,8 +6,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _FLASK_AVC_H_ -#define _FLASK_AVC_H_ +#ifndef XSM__FLASK__INCLUDE__AVC_H +#define XSM__FLASK__INCLUDE__AVC_H #include <xen/errno.h> #include <xen/lib.h>
@@ -100,5 +100,5 @@ extern unsigned int avc_cache_threshold; DECLARE_PER_CPU(struct avc_cache_stats, avc_cache_stats);#endif -#endif /* _FLASK_AVC_H_ */ +#endif /* XSM__FLASK__INCLUDE__AVC_H */
xen/xsm/flask/include/avc_ss.h +3 -3
@@ -3,8 +3,8 @@* * Author : Stephen Smalley, <[email protected]> */ -#ifndef _FLASK_AVC_SS_H_ -#define _FLASK_AVC_SS_H_ +#ifndef XSM__FLASK__INCLUDE__AVC_SS_H +#define XSM__FLASK__INCLUDE__AVC_SS_H #include "flask.h"
@@ -25,5 +25,5 @@ struct selinux_class_perm {extern const struct selinux_class_perm selinux_class_perm; -#endif /* _FLASK_AVC_SS_H_ */ +#endif /* XSM__FLASK__INCLUDE__AVC_SS_H */
xen/xsm/flask/include/conditional.h +2 -2
@@ -10,8 +10,8 @@* the Free Software Foundation, version 2. */ -#ifndef _FLASK_CONDITIONAL_H_ -#define _FLASK_CONDITIONAL_H_ +#ifndef XSM__FLASK__INCLUDE__CONDITIONAL_H +#define XSM__FLASK__INCLUDE__CONDITIONAL_H #include <xen/types.h>
xen/xsm/flask/include/objsec.h +3 -3
@@ -10,8 +10,8 @@* as published by the Free Software Foundation. */ -#ifndef _FLASK_OBJSEC_H_ -#define _FLASK_OBJSEC_H_ +#ifndef XSM__FLASK__INCLUDE__OBJSEC_H +#define XSM__FLASK__INCLUDE__OBJSEC_H #include <xen/sched.h> #include "flask.h"
@@ -23,4 +23,4 @@ struct domain_security_struct { u32 target_sid; /* SID for device model target domain */ }; -#endif /* _FLASK_OBJSEC_H_ */ +#endif /* XSM__FLASK__INCLUDE__OBJSEC_H */
xen/xsm/flask/include/security.h +3 -3
@@ -7,8 +7,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _FLASK_SECURITY_H_ -#define _FLASK_SECURITY_H_ +#ifndef XSM__FLASK__INCLUDE__SECURITY_H +#define XSM__FLASK__INCLUDE__SECURITY_H #include "flask.h"
@@ -107,4 +107,4 @@ int security_ocontext_add(u32 ocontext, unsigned long low,int security_ocontext_del (u32 ocontext,unsigned long low,unsigned long high);int security_devicetree_setlabel (char *path,u32 sid); -#endif /* _FLASK_SECURITY_H_ */ +#endif /* XSM__FLASK__INCLUDE__SECURITY_H */
xen/xsm/flask/private.h +3 -3
@@ -1,9 +1,9 @@ -#ifndef XSM_FLASK_PRIVATE -#define XSM_FLASK_PRIVATE +#ifndef XSM__FLASK__PRIVATE_H +#define XSM__FLASK__PRIVATE_H #include <public/xen.h> long cf_check do_flask_op (XEN_GUEST_HANDLE_PARAM (void ) u_flask_op); int cf_check compat_flask_op(XEN_GUEST_HANDLE_PARAM(void) u_flask_op); -#endif /* XSM_FLASK_PRIVATE */ +#endif /* XSM__FLASK__PRIVATE_H */
xen/xsm/flask/ss/avtab.h +3 -3
@@ -23,8 +23,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _SS_AVTAB_H_ -#define _SS_AVTAB_H_ +#ifndef XSM__FLASK__SS__AVTAB_H +#define XSM__FLASK__SS__AVTAB_H struct avtab_key { u16 source_type; /* source type */
@@ -87,5 +87,5 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node,#define MAX_AVTAB_HASH_MASK (MAX_AVTAB_HASH_BUCKETS-1)#define MAX_AVTAB_SIZE MAX_AVTAB_HASH_BUCKETS -#endif /* _SS_AVTAB_H_ */ +#endif /* XSM__FLASK__SS__AVTAB_H */
xen/xsm/flask/ss/conditional.h +3 -3
@@ -7,8 +7,8 @@* the Free Software Foundation, version 2. */ -#ifndef _CONDITIONAL_H_ -#define _CONDITIONAL_H_ +#ifndef XSM__FLASK__SS__CONDITIONAL_H +#define XSM__FLASK__SS__CONDITIONAL_H #include "avtab.h" #include "symtab.h"
@@ -74,4 +74,4 @@ void cond_compute_av(struct avtab *ctab, struct avtab_key *key, struct av_decisiint evaluate_cond_node (struct policydb *p,struct cond_node *node); -#endif /* _CONDITIONAL_H_ */ +#endif /* XSM__FLASK__SS__CONDITIONAL_H */
xen/xsm/flask/ss/constraint.h +3 -3
@@ -12,8 +12,8 @@* * Author : Stephen Smalley, <[email protected]> */ -#ifndef _SS_CONSTRAINT_H_ -#define _SS_CONSTRAINT_H_ +#ifndef XSM__FLASK__SS__CONSTRAINT_H +#define XSM__FLASK__SS__CONSTRAINT_H #include "ebitmap.h"
@@ -58,4 +58,4 @@ struct constraint_node { struct constraint_node *next; /* next constraint */ }; -#endif /* _SS_CONSTRAINT_H_ */ +#endif /* XSM__FLASK__SS__CONSTRAINT_H */
xen/xsm/flask/ss/context.h +3 -3
@@ -15,8 +15,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _SS_CONTEXT_H_ -#define _SS_CONTEXT_H_ +#ifndef XSM__FLASK__SS__CONTEXT_H +#define XSM__FLASK__SS__CONTEXT_H #include "ebitmap.h" #include "mls_types.h"
@@ -129,5 +129,5 @@ static inline int context_cmp(struct context *c1, struct context *c2) mls_context_cmp(c1, c2)); } -#endif /* _SS_CONTEXT_H_ */ +#endif /* XSM__FLASK__SS__CONTEXT_H */
xen/xsm/flask/ss/ebitmap.h +3 -3
@@ -11,8 +11,8 @@* * Author : Stephen Smalley, <[email protected]> */ -#ifndef _SS_EBITMAP_H_ -#define _SS_EBITMAP_H_ +#ifndef XSM__FLASK__SS__EBITMAP_H +#define XSM__FLASK__SS__EBITMAP_H #include <xen/bitmap.h> #include <xen/bug.h>
@@ -127,4 +127,4 @@ int ebitmap_set_bit(struct ebitmap *e, unsigned long bit, int value);void ebitmap_destroy (struct ebitmap *e);int ebitmap_read (struct ebitmap *e,void *fp); -#endif /* _SS_EBITMAP_H_ */ +#endif /* XSM__FLASK__SS__EBITMAP_H */
xen/xsm/flask/ss/hashtab.h +2 -2
@@ -7,8 +7,8 @@* * Author : Stephen Smalley, <[email protected]> */ -#ifndef _SS_HASHTAB_H_ -#define _SS_HASHTAB_H_ +#ifndef XSM__FLASK__SS__HASHTAB_H +#define XSM__FLASK__SS__HASHTAB_H #define HASHTAB_MAX_NODES 0xffffffff
xen/xsm/flask/ss/mls.h +2 -2
@@ -11,8 +11,8 @@* Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. */ -#ifndef _SS_MLS_H_ -#define _SS_MLS_H_ +#ifndef XSM__FLASK__SS__MLS_H +#define XSM__FLASK__SS__MLS_H #include "context.h" #include "policydb.h"
xen/xsm/flask/ss/mls_types.h +3 -3
@@ -13,8 +13,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _SS_MLS_TYPES_H_ -#define _SS_MLS_TYPES_H_ +#ifndef XSM__FLASK__SS__MLS_TYPES_H +#define XSM__FLASK__SS__MLS_TYPES_H #include "security.h"
@@ -55,4 +55,4 @@ static inline int mls_level_dom(struct mls_level *l1, struct mls_level *l2) (mls_level_dom (&(r2).level[0 ], &(r1).level[0 ]) && \ mls_level_dom(&(r1).level[1], &(r2).level[1])) -#endif /* _SS_MLS_TYPES_H_ */ +#endif /* XSM__FLASK__SS__MLS_TYPES_H */
xen/xsm/flask/ss/policydb.h +3 -3
@@ -23,8 +23,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _SS_POLICYDB_H_ -#define _SS_POLICYDB_H_ +#ifndef XSM__FLASK__SS__POLICYDB_H +#define XSM__FLASK__SS__POLICYDB_H #include "symtab.h" #include "avtab.h"
@@ -292,5 +292,5 @@ static inline int next_entry(void *buf, struct policy_file *fp, size_t bytes) return 0; } -#endif /* _SS_POLICYDB_H_ */ +#endif /* XSM__FLASK__SS__POLICYDB_H */
xen/xsm/flask/ss/services.h +3 -3
@@ -3,13 +3,13 @@* * Author : Stephen Smalley, <[email protected]> */ -#ifndef _SS_SERVICES_H_ -#define _SS_SERVICES_H_ +#ifndef XSM__FLASK__SS__SERVICES_H +#define XSM__FLASK__SS__SERVICES_H #include "policydb.h" #include "sidtab.h" extern struct policydb policydb; -#endif /* _SS_SERVICES_H_ */ +#endif /* XSM__FLASK__SS__SERVICES_H */
xen/xsm/flask/ss/sidtab.h +3 -3
@@ -7,8 +7,8 @@/* Ported to Xen 3.0, George Coker, <[email protected]> */ -#ifndef _SS_SIDTAB_H_ -#define _SS_SIDTAB_H_ +#ifndef XSM__FLASK__SS__SIDTAB_H +#define XSM__FLASK__SS__SIDTAB_H #include "context.h" #include <xen/spinlock.h>
@@ -50,4 +50,4 @@ void sidtab_destroy(struct sidtab *s);void sidtab_set (struct sidtab *dst,struct sidtab *src);void sidtab_shutdown (struct sidtab *s); -#endif /* _SS_SIDTAB_H_ */ +#endif /* XSM__FLASK__SS__SIDTAB_H */
xen/xsm/flask/ss/symtab.h +3 -3
@@ -6,8 +6,8 @@* * Author : Stephen Smalley, <[email protected]> */ -#ifndef _SS_SYMTAB_H_ -#define _SS_SYMTAB_H_ +#ifndef XSM__FLASK__SS__SYMTAB_H +#define XSM__FLASK__SS__SYMTAB_H #include "hashtab.h"
@@ -18,6 +18,6 @@ struct symtab {int symtab_init (struct symtab *s,unsigned int size); -#endif /* _SS_SYMTAB_H_ */ +#endif /* XSM__FLASK__SS__SYMTAB_H */
Signature · 1 line
2.34.1
Quoted 7 lines · Frediano Ziglio
With the help of some scripts and manual checking I updated header guards.
As the changes are pretty large patch was split based on maintainers to reduce mail spamming.
Excluded public headers from the update, they are API, software like Qemu will fail to compile if changed.
Interesting - the first patch I peeked at, ...
Quoted 9 lines
Changes since v1:
- make all commit compile;
- exclude public headers, their guard is not an API.Frediano Ziglio (19):
xen: Update header guards - Generic
xen: Update header guards - X86
xen: Update header guards - ACPI
xen: Update header guards - ARGO
... this one, adjusts a public header. And the diffstat ...
Quoted 7 lines
xen/include/public/arch-arm.h | 6 +++--- xen/include/public/arch-arm/hvm/save.h | 4 ++-- xen/include/public/arch-arm/smccc.h | 6 +++--- xen/include/public/arch-x86/cpufeatureset.h | 6 +++--- xen/include/public/arch-x86/cpuid.h | 6 +++--- xen/include/public/arch-x86/guest-acpi.h | 6 +++--- xen/include/public/arch-x86/hvm/save.h | 6 +++---
Quoted 8 lines
xen/include/public/arch-x86/hvm/start_info.h | 6 +++--- xen/include/public/arch-x86/pmu.h | 6 +++--- xen/include/public/arch-x86/xen-mca.h | 6 +++--- xen/include/public/arch-x86/xen-x86_32.h | 6 +++--- xen/include/public/arch-x86/xen-x86_64.h | 6 +++--- xen/include/public/arch-x86/xen.h | 6 +++--- xen/include/public/argo.h | 4 ++-- xen/include/public/vm_event.h | 6 +++---
... also contradicts that statement. Please clarify.
Jan
Quoted 40 lines · Jan Beulich
Quoted 7 lines · Frediano Ziglio
With the help of some scripts and manual checking I updated header guards.
As the changes are pretty large patch was split based on maintainers to reduce mail spamming.
Excluded public headers from the update, they are API, software like Qemu will fail to compile if changed.
Interesting - the first patch I peeked at, ...
Quoted 9 lines
Changes since v1:
- make all commit compile;
- exclude public headers, their guard is not an API.Frediano Ziglio (19):
xen: Update header guards - Generic
xen: Update header guards - X86
xen: Update header guards - ACPI
xen: Update header guards - ARGO... this one, adjusts a public header. And the diffstat ...
Quoted 7 lines
xen/include/public/arch-arm.h | 6 +++--- xen/include/public/arch-arm/hvm/save.h | 4 ++-- xen/include/public/arch-arm/smccc.h | 6 +++--- xen/include/public/arch-x86/cpufeatureset.h | 6 +++--- xen/include/public/arch-x86/cpuid.h | 6 +++--- xen/include/public/arch-x86/guest-acpi.h | 6 +++--- xen/include/public/arch-x86/hvm/save.h | 6 +++---Quoted 8 lines
xen/include/public/arch-x86/hvm/start_info.h | 6 +++--- xen/include/public/arch-x86/pmu.h | 6 +++--- xen/include/public/arch-x86/xen-mca.h | 6 +++--- xen/include/public/arch-x86/xen-x86_32.h | 6 +++--- xen/include/public/arch-x86/xen-x86_64.h | 6 +++--- xen/include/public/arch-x86/xen.h | 6 +++--- xen/include/public/argo.h | 4 ++-- xen/include/public/vm_event.h | 6 +++---
Quoted 3 lines
... also contradicts that statement. Please clarify.
Jan
Hi,
I just missed these. Excluding, better to be safe for the first
round, we can consider guards in the public headers later.
Frediano