
From: William Lee Irwin III <wli@holomorphy.com>

bad_page() only prints out 8 hexadecimal digits of page->flags regardless
of sizeof(page_flags_t).  This leads to confusing and/or incomplete bug
reports.  The following patch uses a field width argument to replace the
hardcoded %08lx so that bad_page() may print the whole of page->flags.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/mm/page_alloc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN mm/page_alloc.c~make-bad_page-print-all-of-page-flags mm/page_alloc.c
--- 25/mm/page_alloc.c~make-bad_page-print-all-of-page-flags	2004-08-31 23:19:23.770914384 -0700
+++ 25-akpm/mm/page_alloc.c	2004-08-31 23:19:23.775913624 -0700
@@ -79,9 +79,9 @@ static void bad_page(const char *functio
 {
 	printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
 		function, current->comm, page);
-	printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n",
-		(unsigned long)page->flags, page->mapping,
-		page_mapcount(page), page_count(page));
+	printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
+		(int)(2*sizeof(page_flags_t)), (unsigned long)page->flags,
+		page->mapping, page_mapcount(page), page_count(page));
 	printk(KERN_EMERG "Backtrace:\n");
 	dump_stack();
 	printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
_
