From 36e95611ec10e40ad99fae083c18d6ee8580a2f9 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 14 Apr 2026 15:42:18 -0500 Subject: [PATCH] frontend: Properly print available color formats These should be the short names used in parsing, not the full text of what they represent. Signed-off-by: Derek Foreman --- frontend/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/main.c b/frontend/main.c index cfcd83083..08aafe300 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -2420,16 +2420,15 @@ wet_output_set_color_format(struct weston_output *output, entry = weston_enum_map_find_name(color_formats, str); if (!entry) { - char *mask_to_str = NULL; + unsigned int i; + weston_log("Error in config for output '%s': '%s' is not a " "valid color format. Try one of: ", output->name, str); - mask_to_str = bits_to_str(WESTON_COLOR_FORMAT_ALL_MASK, - weston_color_format_to_str); - weston_log_continue("%s\n", mask_to_str); - - free(mask_to_str); + for (i = 0; i < ARRAY_LENGTH(color_formats); i++) + weston_log_continue(" %s", color_formats[i].name); + weston_log_continue("\n"); free(str); return -1; }