[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [patch] define panic() to have printf attributes



add format printf attribute to panic() prototype and fix the error this catches.
-JX


Signed-Off-By: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
$ hg diff | diffstat -p1 ; hg diff
xen/arch/x86/traps.c  |    2 +-
xen/include/xen/lib.h |    3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff -r 401624a17ef7 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Mar 23 14:45:21 2006 +0100
+++ b/xen/arch/x86/traps.c      Fri Mar 24 12:03:02 2006 -0500
@@ -657,7 +657,7 @@ asmlinkage int do_page_fault(struct cpu_
         show_page_walk(addr);
         panic("CPU%d FATAL PAGE FAULT\n"
               "[error_code=%04x]\n"
-              "Faulting linear address: %p\n",
+              "Faulting linear address: 0x%lx\n",
               smp_processor_id(), regs->error_code, addr);
     }
diff -r 401624a17ef7 xen/include/xen/lib.h
--- a/xen/include/xen/lib.h     Thu Mar 23 14:45:21 2006 +0100
+++ b/xen/include/xen/lib.h     Fri Mar 24 12:03:02 2006 -0500
@@ -47,7 +47,8 @@ extern void debugtrace_printk(const char
#define printk(_f , _a...) printf( _f , ## _a )
extern void printf(const char *format, ...)
     __attribute__ ((format (printf, 1, 2)));
-extern void panic(const char *format, ...);
+extern void panic(const char *format, ...)
+    __attribute__ ((format (printf, 1, 2)));
extern long vm_assist(struct domain *, unsigned int, unsigned int);
/* vsprintf.c */


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.