Messages in this thread | | | Date | Tue, 28 Sep 2004 10:21:57 +0800 | From | "xuhaoz" <> | Subject | printk can't display %d number , but can display %u, %s, .... |
| |
Hi:
Yesterday, I found a strangeous problem that printk in my OS can't print %d format number, but can print %u, %x ...
why?
let's see an example:
unsigned int memsize;
memsize=64;
printk("memsize unknown: setting to %dMB\n",memsize);
if I use %d to display, the result of memsize is -18446744073709551552MB
printk("memsize unknown: setting to %uMB\n",memsize);
if I use %u to display ,the result of memsize is 64MB
Would you please tell me what leads to this problem?
xuhaoz@neonetech.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |