Re: [PATCH v2 01/14] tools/rv: Fix substring match bug in monitor name search

From: Nam Cao

Date: Mon May 18 2026 - 04:14:09 EST


Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> static int __ikm_find_monitor_name(char *monitor_name, char *out_name)
> {
> - char *available_monitors, container[MAX_DA_NAME_LEN+1], *cursor, *end;
> - int retval = 1;
> + char *available_monitors, *cursor, *line;
> + int len = strlen(monitor_name);
> + int found = 0;
>
> available_monitors = tracefs_instance_file_read(NULL, "rv/available_monitors", NULL);
> if (!available_monitors)
> return -1;
>
> - cursor = strstr(available_monitors, monitor_name);
> - if (!cursor) {
> - retval = 0;
> - goto out_free;
> - }
> + config_is_container = 0;

Isn't config_is_container unused?

Perhaps it is used in a follow-up patch? Let me keep reading..

Nam