test_output: handle kmscon_comp*_use failure
Move the call before the wakeup and also check its return code. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
290601396e
commit
240d6671ba
@ -180,6 +180,12 @@ int main(int argc, char **argv)
|
||||
return abs(ret);
|
||||
}
|
||||
|
||||
ret = kmscon_compositor_use(comp);
|
||||
if (ret) {
|
||||
log_err("Cannot use compositor: %d\n", ret);
|
||||
goto err_unref;
|
||||
}
|
||||
|
||||
log_info("Wakeing up compositor...\n");
|
||||
ret = kmscon_compositor_wake_up(comp);
|
||||
if (ret < 0) {
|
||||
@ -187,8 +193,6 @@ int main(int argc, char **argv)
|
||||
goto err_unref;
|
||||
}
|
||||
|
||||
kmscon_compositor_use(comp);
|
||||
|
||||
if (argc < 2) {
|
||||
ret = list_outputs(comp);
|
||||
if (ret) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user