提交 47812e00 编写于 作者: T Thomas Richter 提交者: Arnaldo Carvalho de Melo

perf s390: Fix reading cpuid model information

Commit eca0fa28 (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: NThomas 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: eca0fa28 ("perf record: Provide detailed information on s390 CPU")
Link: http://lkml.kernel.org/r/20180219102444.96900-1-tmricht@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 11737ca9
......@@ -81,7 +81,7 @@ int get_cpuid(char *buffer, size_t sz)
line2 = line + strlen(SYSINFO_MODEL);
while ((cp = strtok_r(line2, "\n ", &line2))) {
mdsize += scnprintf(model + mdsize, sizeof(type) - mdsize,
mdsize += scnprintf(model + mdsize, sizeof(model) - mdsize,
"%s%s", model[0] ? "," : "", cp);
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册