Skip to contentSkip to conversation

ARM: Prefix hex numbers in /proc/cpuinfo

PATCH New Daniel Mack 1 participant 1 message Nov 12, 2009 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Prefix hex numbers in /proc/cpuinfo

The 'Revision' and 'Serial' fields in /proc/cpuinfo are reported as hex numbers, so they should have a '0x' prefix to make that clear. Otherwise, parsers will take them as decimal number unless they contain a letter.

---
 arch/arm/kernel/setup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/kernel/setup.c +2 -2
index c6c57b6..1bd2aa6 100644
@@ -860,8 +860,8 @@ static int c_show(struct seq_file *m, void *v)
 	seq_puts(m, "\n");
 
 	seq_printf(m, "Hardware\t: %s\n", machine_name);
-	seq_printf(m, "Revision\t: %04x\n", system_rev);
-	seq_printf(m, "Serial\t\t: %08x%08x\n",
+	seq_printf(m, "Revision\t: 0x%04x\n", system_rev);
+	seq_printf(m, "Serial\t\t: 0x%08x%08x\n",
 		   system_serial_high, system_serial_low);
 
 	return 0;
Signature · 1 line
1.6.5.2