Skip to content

string2ibpi does not compare strings correctly and ledctl locate_off does not work #259

@nicholasyang2022

Description

@nicholasyang2022

In

ledmon/src/lib/utils.c

Lines 758 to 768 in 0314b8d

enum led_ibpi_pattern string2ibpi(const char *name)
{
int i;
for (i = 0; i < ARRAY_SIZE(ipbi_names); i++) {
char *input_name = ipbi_names[i].input_name;
if (!input_name)
continue;
if (strncmp(input_name, name, strlen(input_name)) == 0)

Strings are comapred using strncmp(input_name, name, strlen(input_name)). When name is locate_off, it matches locate from the array instead of locate_off.

This makes ledctl locate_off to execute the locate logic.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions