In kernel 3.11 it was renamed to printk_log.
See kernel commit 62e32ac3505a0cab1c5ef8ea2c0eab3b26ed855f
Tested: can run 'log' command for 3.11-rc4 and 3.3 kernel dumps
---
kernel.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/kernel.c b/kernel.c
index 73c2cc6..ab776b8 100755
--- a/kernel.c
+++ b/kernel.c
@@ -4428,17 +4428,26 @@ dump_variable_length_record_log(int msg_flags)
{
uint32_t idx, log_first_idx, log_next_idx, log_buf_len;
ulong log_buf;
- char *logptr, *logbuf;
+ char *logptr, *logbuf, *log_struct_name;
+
+ if (STRUCT_EXISTS("printk_log")) {
+ // In kernel 3.11 the log structure name was renamed
+ // log -> printk_log
+ // See 62e32ac3505a0cab
+ log_struct_name = "printk_log";
+ } else {
+ log_struct_name = "log";
+ }
if (INVALID_SIZE(log)) {
- STRUCT_SIZE_INIT(log, "log");
- MEMBER_OFFSET_INIT(log_ts_nsec, "log", "ts_nsec");
- MEMBER_OFFSET_INIT(log_len, "log", "len");
- MEMBER_OFFSET_INIT(log_text_len, "log", "text_len");
- MEMBER_OFFSET_INIT(log_dict_len, "log", "dict_len");
- MEMBER_OFFSET_INIT(log_level, "log", "level");
- MEMBER_SIZE_INIT(log_level, "log", "level");
- MEMBER_OFFSET_INIT(log_flags_level, "log", "flags_level");
+ STRUCT_SIZE_INIT(log, log_struct_name);
+ MEMBER_OFFSET_INIT(log_ts_nsec, log_struct_name, "ts_nsec");
+ MEMBER_OFFSET_INIT(log_len, log_struct_name, "len");
+ MEMBER_OFFSET_INIT(log_text_len, log_struct_name, "text_len");
+ MEMBER_OFFSET_INIT(log_dict_len, log_struct_name, "dict_len");
+ MEMBER_OFFSET_INIT(log_level, log_struct_name, "level");
+ MEMBER_SIZE_INIT(log_level, log_struct_name, "level");
+ MEMBER_OFFSET_INIT(log_flags_level, log_struct_name, "flags_level");
/*
* If things change, don't kill a dumpfile session
--
1.8.3