All of lore.kernel.org
 help / color / mirror / Atom feed
From: jani.nikula at linux.intel.com
To: powertop@lists.01.org
Subject: [Powertop] [PATCH] Add a more informative error message about MSR not found
Date: Thu, 21 Feb 2013 11:27:34 +0200	[thread overview]
Message-ID: <1361438855-14060-1-git-send-email-jani.nikula@linux.intel.com> (raw)

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

From: Jani Nikula <jani.nikula(a)intel.com>

Suggest enabling CONFIG_X86_MSR. Add \n at the end of the error message.

Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>

---

Note: This breaks translations looking for msgid "msr reg not found". I'm
unsure how you want this kind of changes handled.
---
 src/cpu/intel_cpus.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 2b78d31..30c311f 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -58,7 +58,7 @@ static uint64_t get_msr(int cpu, uint64_t offset)
 		fd = sprintf(msr_path, "/dev/msr%d", cpu);
 
 		if (access(msr_path, R_OK) != 0){
-			fprintf(stderr, _("msr reg not found"));
+			fprintf(stderr, _("Model-specific registers (MSR) not found (try enabling CONFIG_X86_MSR).\n"));
 			exit(-2);
 		}
 	}
-- 
1.7.9.5


             reply	other threads:[~2013-02-21  9:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21  9:27 jani.nikula [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-02-21  9:37 [Powertop] [PATCH] Add a more informative error message about MSR not found Sergey Senozhatsky
2013-02-21 11:17 Jani Nikula
2013-02-21 12:52 Sergey Senozhatsky

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=1361438855-14060-1-git-send-email-jani.nikula@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.