]> xenbits.xensource.com Git - xen.git/commitdiff
xsm: only define XSM_MAGIC in xsm.h
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 16 Mar 2016 19:18:42 +0000 (14:18 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 25 Mar 2016 15:29:44 +0000 (11:29 -0400)
Rather than have XSM_MAGIC set in the global xen/config.h and set in
xsm.h if it's unset, just set it once in xsm.h since its only used in
files that already include xsm.h

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/include/xen/config.h
xen/include/xsm/xsm.h

index 96f5539ae7d434dcd2e798fa020c769a7a3c95c2..3f8c53dd887edb940dd5b883d5f1fb2e1c71c6c5 100644 (file)
@@ -79,7 +79,6 @@
 #define STR(...) __STR(__VA_ARGS__)
 
 #ifdef CONFIG_FLASK
-#define XSM_MAGIC 0xf97cff8c
 /* Maintain statistics on the access vector cache */
 #define FLASK_AVC_STATS 1
 #endif
index 5ecbee08e03d5a93f4db301ddb19b328ec220fc1..f3d87ab67fa7919fda74f6855b62f54d5d92c8dd 100644 (file)
@@ -23,8 +23,11 @@ DEFINE_XEN_GUEST_HANDLE(xsm_op_t);
 
 /* policy magic number (defined by XSM_MAGIC) */
 typedef u32 xsm_magic_t;
-#ifndef XSM_MAGIC
-#define XSM_MAGIC 0x00000000
+
+#ifdef CONFIG_FLASK
+#define XSM_MAGIC 0xf97cff8c
+#else
+#define XSM_MAGIC 0x0
 #endif
 
 /* These annotations are used by callers and in dummy.h to document the