frontend: improve error message

We have the following error message in parse_color_characteristics():

name=%s: reserved name. Do not use ':' character in the name.

It gets confusing when "name" ends with ':'. So rephrase it to clarify
the error message in such case.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2024-08-04 12:06:30 -03:00 committed by Pekka Paalanen
parent d3ef4f9576
commit cb43a086b5
2 changed files with 2 additions and 2 deletions

View file

@ -1623,7 +1623,7 @@ parse_color_characteristics(struct weston_color_characteristics *cc_out,
&section_name, "<unnamed>");
if (strchr(section_name, ':') != NULL) {
ret = -1;
weston_log("%s name=%s: reserved name. Do not use ':' character in the name.\n",
weston_log("%s name=%s is a reserved name. Do not use ':' character in the name.\n",
msgpfx, section_name);
}

View file

@ -70,7 +70,7 @@ static const struct config_testcase config_cases[] = {
},
{
true, "fr:ed", "fr:ed", "red_x=0.9", "green_y=0.8", "white_y=0.323", "min_L=1e-4", -1,
"Config error in weston.ini [color_characteristics] name=fr:ed: reserved name. Do not use ':' character in the name.\n"
"Config error in weston.ini [color_characteristics] name=fr:ed is a reserved name. Do not use ':' character in the name.\n"
},
{
true, "fred", "fred", "red_x=-5", "green_y=1.01", "white_y=0.323", "min_L=1e-4", -1,