FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 01-24-2011, 08:35 AM
Lai Jiangshan
 
Default crash-trace-command: support old kernel that has no print_fmt

very old kernel has no print_fmt field, use "Unknown print_fmt"
instead.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/extensions/trace.c b/extensions/trace.c
index e04c504..714765e 100755
--- a/extensions/trace.c
+++ b/extensions/trace.c
@@ -1080,8 +1080,10 @@ int ftrace_get_event_type_print_fmt(ulong call, char **print_fmt)
fmt_offset = MEMBER_OFFSET("ftrace_event_call", "print_fmt");
}

- if (fmt_offset < 0)
- return -1;
+ if (fmt_offset < 0) {
+ *print_fmt = strdup("Unknown print_fmt");
+ return 0;
+ }

if (!readmem(call + fmt_offset, KVADDR, &fmt_addr, sizeof(fmt_addr),
"read ftrace_event_call fmt_addr", RETURN_ON_ERROR))

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 01:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org