weston-launch: quit if -t without -u
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 1 Nov 2017 10:12:17 +0000 (12:12 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 28 Nov 2017 07:17:35 +0000 (09:17 +0200)
commit5949e48d1dc2de76c9f0daaec6a7ce20c2b89dab
tree5b6d33e2853288e9866c25e0c27868fea8699c15
parent1fdeb68013ae3c716e32dadbf9269027836ff732
weston-launch: quit if -t without -u

setup_tty() function uses the tty argument for choosing the tty/VT only
if wl->new_user (the -u option) is given. If the tty option is given
without -u, it will only be used for misleading error messages.

To make it clear to the user that -t without -u does not work the way
one might think, let weston-launch exit with an error in that case.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
libweston/weston-launch.c