[Powertop] [PATCH v2] Bug-fix: for html & csv value for CPU Information

Alexandra Yates <alexandra.yates at linux.intel.com>
Newsgroups dev.linux.lists.powertop
Message-ID <1403118789-21862-2-git-send-email-alexandra.yates@linux.intel.com>
Added cast from long-int to string to correct printout for
"CPU Information" field on html and csv report.

Tested: by Christophe Prigent and Igor Zhbanov

Signed-off-by: Alexandra Yates <alexandra.yates(a)linux.intel.com>
---
 src/report/report.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/report/report.cpp b/src/report/report.cpp
index 9e94607..d55531e 100644
--- a/src/report/report.cpp
+++ b/src/report/report.cpp
@@ -136,7 +136,9 @@ static void system_info(void)
 	system_data[5].append(str.c_str());
 	str = cpu_model();
 	system_data[6]=__("CPU Information");
-	system_data[7]= sysconf(_SC_NPROCESSORS_ONLN);
+	stringstream n_proc;
+	n_proc << sysconf(_SC_NPROCESSORS_ONLN);
+	system_data[7]= n_proc.str();
 	system_data[7].append(str.c_str());
 
 	str = read_sysfs_string("/etc/system-release");
-- 
1.7.9.5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.