=== modified file 'ChangeLog' --- ChangeLog 2012-08-05 14:49:03 +0000 +++ ChangeLog 2012-08-14 03:29:49 +0000 @@ -1,3 +1,7 @@ +2012-08-13 Paulo Flabiano Smorigo + + * grub-core/kern/misc.c: Add %X option to printf functions. + 2012-08-05 Grégoire Sutre * configure.ac: Strengthen the test for working -nostdinc -isystem. === modified file 'grub-core/kern/misc.c' --- grub-core/kern/misc.c 2012-05-28 15:49:18 +0000 +++ grub-core/kern/misc.c 2012-08-14 03:26:15 +0000 @@ -596,7 +596,7 @@ static char * grub_lltoa (char *str, int c, unsigned long long n) { - unsigned base = (c == 'x') ? 16 : 10; + unsigned base = ((c == 'x') || (c == 'X')) ? 16 : 10; char *p; if ((long long) n < 0 && c == 'd') @@ -611,7 +611,7 @@ do { unsigned d = (unsigned) (n & 0xf); - *p++ = (d > 9) ? d + 'a' - 10 : d + '0'; + *p++ = (d > 9) ? d + ((c == 'x') ? 'a' : 'A') - 10 : d + '0'; } while (n >>= 4); else @@ -702,6 +702,7 @@ { case 'p': case 'x': + case 'X': case 'u': case 'd': case 'c': @@ -777,6 +778,7 @@ switch (c) { case 'x': + case 'X': case 'u': case 'd': if (longlongfmt) @@ -918,6 +920,7 @@ longlongfmt |= (sizeof (void *) == sizeof (long long)); /* Fall through. */ case 'x': + case 'X': case 'u': unsig = 1; /* Fall through. */