[RESEND PATCH] vmcore-dmesg: Understand >= v3.11-rc4 dmesg

Dave Young dyoung at redhat.com
Thu Sep 19 10:38:15 EDT 2013


On 09/18/13 at 02:21pm, Lubomir Rintel wrote:
> Symbol name changed with the following commit:
> 62e32ac printk: rename struct log to struct printk_log
> 
> Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
> Cc: Simon Horman <horms at verge.net.au>
> Cc: Vivek Goyal <vgoyal at redhat.com>
> Cc: Joe Perches <joe at perches.com>
> Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
> ---
> 
> I believe this can now be applied, as the change went into 3.11 kernel release.
> Thank you!

It works for me, thanks.

But there's still a minor issue, can you also update other
comments besides of SIZEOF(log)? I think it's better to mention that
log has been renamed printk_log since 3.11 kernel.

> 
>  vmcore-dmesg/vmcore-dmesg.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
> index 0f477c0..bfc19e9 100644
> --- a/vmcore-dmesg/vmcore-dmesg.c
> +++ b/vmcore-dmesg/vmcore-dmesg.c
> @@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
>  			*symbol[i].vaddr = vaddr;
>  		}
>  
> -		/* Check for "SIZE(log)=" */
> +		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
>  		if (memcmp("SIZE(log)=", pos, 10) == 0)
>  			log_sz = strtoull(pos + 10, NULL, 10);
> +		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
> +			log_sz = strtoull(pos + 17, NULL, 10);
>  
>  		/* Check for struct log field offsets */
>  		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
>  			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
> +			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
>  			log_offset_len = strtoul(pos + 16, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
> +			log_offset_len = strtoul(pos + 23, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
>  			log_offset_text_len = strtoul(pos + 21, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
> +			log_offset_text_len = strtoul(pos + 28, NULL, 10);
>  
>  		if (last_line)
>  			break;
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



More information about the kexec mailing list