Skip to contentSkip to conversation

bogus definitions and declarations in kexec.h

PATCH In review Jan Beulich 2 participants 2 messages Nov 19, 2008 – Nov 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bogus definitions and declarations in kexec.h

These definitions (and in particular the function declarations) don't really belong in the interface headers - each OS ought to define what it needs on its own. They conflict with definitions in Linux 2.6.24+, but in order to not break the build for older Linux this patch just makes them conditional (which is sufficient to resolve the conflict as long as the Xen header is always included after the Linux one).

Along with the patch goes the request to sync the linux tree's public headers once again.

xen/include/public/kexec.h +4 -0
@@ -155,6 +155,8 @@ typedef struct xen_kexec_range {
     unsigned long start;
 } xen_kexec_range_t;
 
+#ifndef VMCOREINFO_BYTES
+
 /* vmcoreinfo stuff */
 #define VMCOREINFO_BYTES           (4096)
 #define VMCOREINFO_NOTE_NAME       "VMCOREINFO_XEN"
@@ -176,6 +178,8 @@ void vmcoreinfo_append_str(const char *f
        vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #alias, \
                              (unsigned long)offsetof(struct name, field))
 
+#endif /* VMCOREINFO_* */
+
 #endif /* _XEN_PUBLIC_KEXEC_H */
 
 /*
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jan Beulich

These definitions (and in particular the function declarations) don't really belong in the interface headers - each OS ought to define what it needs on its own. They conflict with definitions in Linux 2.6.24+, but in order to not break the build for older Linux this patch just makes them conditional (which is sufficient to resolve the conflict as long as the Xen header is always included after the Linux one).

Along with the patch goes the request to sync the linux tree's public headers once again.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en