Skip to content

Commit 47812e0

Browse files
Thomas Richteracmel
authored andcommitted
perf s390: Fix reading cpuid model information
Commit eca0fa2 (perf record: Provide detailed information on s390 CPU") fixed a build error on Ubuntu. However the fix uses the wrong size to print the model information. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Fixes: eca0fa2 ("perf record: Provide detailed information on s390 CPU") Link: http://lkml.kernel.org/r/20180219102444.96900-1-tmricht@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 11737ca commit 47812e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/perf/arch/s390/util/header.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int get_cpuid(char *buffer, size_t sz)
8181
line2 = line + strlen(SYSINFO_MODEL);
8282

8383
while ((cp = strtok_r(line2, "\n ", &line2))) {
84-
mdsize += scnprintf(model + mdsize, sizeof(type) - mdsize,
84+
mdsize += scnprintf(model + mdsize, sizeof(model) - mdsize,
8585
"%s%s", model[0] ? "," : "", cp);
8686
}
8787
break;

0 commit comments

Comments
 (0)