All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandra Yates <alexandra.yates at linux.intel.com>
To: powertop@lists.01.org
Subject: [Powertop] [PATCH] Bug-fix: for html & csv value for CPU Information
Date: Mon, 16 Jun 2014 12:28:22 -0700	[thread overview]
Message-ID: <1402946904-20472-2-git-send-email-alexandra.yates@linux.intel.com> (raw)
In-Reply-To: 1402946904-20472-1-git-send-email-alexandra.yates@linux.intel.com

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

Added cast from long-int to string to correct printout for
"CPU Information" field on html and csv report.

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..6eb2b63 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


             reply	other threads:[~2014-06-16 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 19:28 Alexandra Yates [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-17  8:50 [Powertop] [PATCH] Bug-fix: for html & csv value for CPU Information Igor Zhbanov
2014-06-16 19:28 Alexandra Yates

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402946904-20472-2-git-send-email-alexandra.yates@linux.intel.com \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.