WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] define panic() to have printf attributes
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Fri, 24 Mar 2006 13:11:01 -0500
Delivery-date: Fri, 24 Mar 2006 18:12:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] define panic() to have printf attributes, Jimi Xenidis <=