compositor: Fail on invalid transform for headless
authorDaniel Stone <daniels@collabora.com>
Mon, 9 Mar 2020 16:26:34 +0000 (16:26 +0000)
committerPekka Paalanen <pq@iki.fi>
Wed, 11 Mar 2020 10:38:08 +0000 (10:38 +0000)
As in aaf35586f471, we want to fail when we are passed an invalid
transform name, not just blindly configure on using the normal
transform. The previous commit missed the callsite from the headless
backend's command-line parsing.

Fix this so that headless fails when an invalid transform is specified
on the command line.

Signed-off-by: Daniel Stone <daniels@collabora.com>
compositor/main.c

index c9002bf43eb599ed9cb475d4c4e1f167a59f9fe9..c1a7270172d06bf1d08875be764b7cb5598da422 100644 (file)
@@ -2602,7 +2602,7 @@ load_headless_backend(struct weston_compositor *c,
        if (transform) {
                if (weston_parse_transform(transform, &parsed_options->transform) < 0) {
                        weston_log("Invalid transform \"%s\"\n", transform);
-                       parsed_options->transform = UINT32_MAX;
+                       return -1;
                }
                free(transform);
        }