aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ogness <[email protected]>2020-07-09 15:29:41 +0206
committerPetr Mladek <[email protected]>2020-07-10 08:47:40 +0200
commit0d6f55403a47b317c0d9511a80545c19ab0ef52f (patch)
tree392fa710b7efde0c2cfa339c51c7d634a9df7ff9
parent625d3449788f85569096780592549d0340e9c0c7 (diff)
crash: add VMCOREINFO macro to define offset in a struct declared by typedef
The existing macro VMCOREINFO_OFFSET() can't be used for structures declared via typedef because "struct" is not part of type definition. Create another macro for this purpose. Signed-off-by: John Ogness <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Acked-by: Baoquan He <[email protected]> Acked-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--include/linux/crash_core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h
index 525510a9f965..43b51c9df571 100644
--- a/include/linux/crash_core.h
+++ b/include/linux/crash_core.h
@@ -53,6 +53,9 @@ phys_addr_t paddr_vmcoreinfo_note(void);
#define VMCOREINFO_OFFSET(name, field) \
vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
(unsigned long)offsetof(struct name, field))
+#define VMCOREINFO_TYPE_OFFSET(name, field) \
+ vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
+ (unsigned long)offsetof(name, field))
#define VMCOREINFO_LENGTH(name, value) \
vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value)
#define VMCOREINFO_NUMBER(name) \