]> git.ozlabs.org Git - ccan/blobdiff - ccan/cpuid/test/run.c
cpuid: use a sprintf-like function to get cputype as a string
[ccan] / ccan / cpuid / test / run.c
index 88c241a196ff33398c7424e9956463de605384c6..843389fa2a7733178b4399bfb6d6fe3e2c07dd5d 100644 (file)
@@ -10,7 +10,9 @@ int main(void)
                return 1;
        }
 
-       printf ("Vendor ID: %s\n", cpuid_get_cpu_type_string (cpuid_get_cpu_type ()));
+       char cputype[12];
+       if (cpuid_sprintf_cputype(cpuid_get_cpu_type(), cputype))
+               printf ("Vendor ID: %s\n", cputype);
 
        char buf[48];
        cpuid(CPU_PROC_BRAND_STRING, (uint32_t *)buf);