summaryrefslogtreecommitdiff
path: root/util/msrtool/msrtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/msrtool/msrtool.c')
-rw-r--r--util/msrtool/msrtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/msrtool/msrtool.c b/util/msrtool/msrtool.c
index 5742a1765c..bafb0908c0 100644
--- a/util/msrtool/msrtool.c
+++ b/util/msrtool/msrtool.c
@@ -278,7 +278,7 @@ int main(int argc, char *argv[]) {
break;
case 'i':
input = 1;
- addr = strtoul(optarg, NULL, 16);
+ addr = msraddrbyname(optarg);
optarg = strchr(optarg, '=');
if (NULL == optarg) {
fprintf(stderr, "missing value in -i argument!\n");
@@ -398,7 +398,7 @@ int main(int argc, char *argv[]) {
}
for (; optind < argc; optind++) {
- addr = strtoul(argv[optind], NULL, 16);
+ addr = msraddrbyname(argv[optind]);
if (!sys->rdmsr(cpu, addr, &msrval))
break;
decodemsr(cpu, addr, msrval);