Hi all,
This adds the option to print hex in upper case. It is necessary for
the search config file patch.
--
Paulo Flabiano Smorigo
Software Engineer
Linux Technology Center - IBM Systems & Technology Group
freenode/bluenet: pfsmorigo or smow
=== 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 <[email protected]>
+
+ * grub-core/kern/misc.c: Add %X option to printf functions.
+
2012-08-05 Grégoire Sutre <[email protected]>
* 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. */
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel