[coreboot-gerrit] Patch set updated for coreboot: a2f7ede inteltool/inteltool.c: Prepend hexadecimal values with `0x`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Wed Jul 17 17:13:25 CEST 2013


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3776

-gerrit

commit a2f7ede95fc3215df35ecf6bf2fca6a7d1f2070a
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Wed Jul 17 14:07:27 2013 +0200

    inteltool/inteltool.c: Prepend hexadecimal values with `0x`
    
    Currently, it is not clear what base is used in inteltool’s output.
    
    	$ sudo ./inteltool | grep Model
    	CPU: ID 0x1067a, Processor Type 0, Family 6, Model 17, Stepping a
    	$ grep -i model /proc/cpuinfo
    	model		: 23
    	model name	: Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
    	[…]
    
    To avoid confusion, make it clear, that `inteltool` outputs hexadecimal
    numbers by prepending it explicitly with `0x`.
    
    	$ sudo ./inteltool | grep Model
    	CPU: ID 0x1067a, Processor Type 0x0, Family 0x6, Model 0x17, Stepping 0xa
    
    The `#` flag in the format string is not used for consistency, as
    prepending `0x` is already done once in the code.
    
    Change-Id: I379e11bfd804e82e2a3c460b1de915a93513bf5f
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 util/inteltool/inteltool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c
index 7d892cb..219d84e 100644
--- a/util/inteltool/inteltool.c
+++ b/util/inteltool/inteltool.c
@@ -374,7 +374,7 @@ int main(int argc, char *argv[])
 	 * left-shifted "Extended Model" fields.
 	 * http://download.intel.com/design/processor/applnots/24161832.pdf
 	 */
-	printf("CPU: ID 0x%x, Processor Type %x, Family %x, Model %x, Stepping %x\n",
+	printf("CPU: ID 0x%x, Processor Type 0x%x, Family 0x%x, Model 0x%x, Stepping 0x%x\n",
 			id, (id >> 12) & 0x3, ((id >> 8) & 0xf) + ((id >> 20) & 0xff),
 			((id >> 12) & 0xf0) + ((id >> 4) & 0xf), (id & 0xf));
 



More information about the coreboot-gerrit mailing list