aubinator_error_decode: Compare only the class_name of the ring.

ring_name is "<class_name> + <instance_id>" (e.g. rcs0). So we need to
first compare the class name only, then get the instance id.

Without this, INSTDONE is not being decoded.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Rafael Antognolli 2018-03-20 09:13:08 -07:00
parent 8d5cd91ca0
commit 5297a17571
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ static int ring_name_to_class(const char *ring_name,
[VECS] = "vecs",
};
for (size_t i = 0; i < ARRAY_SIZE(class_names); i++) {
if (strcmp(ring_name, class_names[i]))
if (strncmp(ring_name, class_names[i], strlen(class_names[i])))
continue;
*class = i;