tools/power turbostat: Fix names matching

Fix the 'find_msrp_by_name()' function which returns incorrect matches for
cases like this:

s1 = "C1-";
find_msrp_by_name(head, s1);

Inside 'find_msrp_by_name()':
...
s2 = "C1"
if !(strcnmp(s1, s2, len(s2)))
// Incorrect match!
return mp;

Full strings should be match istead. Switch to 'strcmp()' to fix the problem.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by Artem Bityutskiy and committed by Len Brown 5132681d b312d880

+1 -1
+1 -1
tools/power/x86/turbostat/turbostat.c
··· 9612 for (mp = head; mp; mp = mp->next) { 9613 if (debug) 9614 fprintf(stderr, "%s: %s %s\n", __func__, name, mp->name); 9615 - if (!strncmp(name, mp->name, strlen(mp->name))) 9616 return mp; 9617 } 9618 return NULL;
··· 9612 for (mp = head; mp; mp = mp->next) { 9613 if (debug) 9614 fprintf(stderr, "%s: %s %s\n", __func__, name, mp->name); 9615 + if (!strcmp(name, mp->name)) 9616 return mp; 9617 } 9618 return NULL;