launchers: Remove --tty option

This doesn't work with any of the launchers we've kept. Remove the option
and all the bits that handle it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-03-02 10:51:15 -06:00
parent a96dfc7098
commit 2c91c70250
11 changed files with 10 additions and 30 deletions

View File

@ -689,7 +689,6 @@ usage(int error_code)
fprintf(out,
"Options for drm-backend.so:\n\n"
" --seat=SEAT\t\tThe seat that weston should run on, instead of the seat defined in XDG_SEAT\n"
" --tty=TTY\t\tThe tty to use\n"
" --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n"
" --use-pixman\t\tUse the pixman (CPU) renderer\n"
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n"
@ -699,7 +698,6 @@ usage(int error_code)
#if defined(BUILD_FBDEV_COMPOSITOR)
fprintf(out,
"Options for fbdev-backend.so:\n\n"
" --tty=TTY\t\tThe tty to use\n"
" --device=DEVICE\tThe framebuffer device to use\n"
" --seat=SEAT\t\tThe seat that weston should run on, instead of the seat defined in XDG_SEAT\n"
"\n");
@ -2639,7 +2637,6 @@ load_drm_backend(struct weston_compositor *c,
const struct weston_option options[] = {
{ WESTON_OPTION_STRING, "seat", 0, &config.seat_id },
{ WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
{ WESTON_OPTION_STRING, "drm-device", 0, &config.specific_device },
{ WESTON_OPTION_BOOLEAN, "current-mode", 0, &wet->drm_use_current_mode },
{ WESTON_OPTION_BOOLEAN, "use-pixman", 0, &config.use_pixman },
@ -2882,7 +2879,6 @@ load_fbdev_backend(struct weston_compositor *c,
int ret = 0;
const struct weston_option fbdev_options[] = {
{ WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
{ WESTON_OPTION_STRING, "device", 0, &config.device },
{ WESTON_OPTION_STRING, "seat", 0, &config.seat_id },
};

View File

@ -35,7 +35,7 @@
extern "C" {
#endif
#define WESTON_DRM_BACKEND_CONFIG_VERSION 4
#define WESTON_DRM_BACKEND_CONFIG_VERSION 5
struct libinput_device;
@ -171,9 +171,6 @@ weston_drm_virtual_output_get_api(struct weston_compositor *compositor)
struct weston_drm_backend_config {
struct weston_backend_config base;
/** The tty to be used. Set to 0 to use the current tty. */
int tty;
/** Whether to use the pixman renderer instead of the OpenGL ES renderer. */
bool use_pixman;

View File

@ -34,14 +34,13 @@ extern "C" {
#include <libweston/libweston.h>
#define WESTON_FBDEV_BACKEND_CONFIG_VERSION 2
#define WESTON_FBDEV_BACKEND_CONFIG_VERSION 3
struct libinput_device;
struct weston_fbdev_backend_config {
struct weston_backend_config base;
int tty;
char *device;
/** Callback used to configure input devices.

View File

@ -3018,8 +3018,7 @@ drm_backend_create(struct weston_compositor *compositor,
goto err_compositor;
/* Check if we run drm-backend using a compatible launcher */
compositor->launcher = weston_launcher_connect(compositor, config->tty,
seat_id, true);
compositor->launcher = weston_launcher_connect(compositor, seat_id, true);
if (compositor->launcher == NULL) {
weston_log("fatal: your system should either provide the "
"logind D-Bus API, or use seatd.\n");

View File

@ -924,7 +924,7 @@ fbdev_backend_create(struct weston_compositor *compositor,
wl_signal_add(&compositor->session_signal,
&backend->session_listener);
compositor->launcher =
weston_launcher_connect(compositor, param->tty, seat_id, false);
weston_launcher_connect(compositor, seat_id, false);
if (!compositor->launcher) {
weston_log("fatal: your system should either provide the "
"logind D-Bus API, or use seatd.\n");
@ -968,7 +968,6 @@ out_compositor:
static void
config_init_to_defaults(struct weston_fbdev_backend_config *config)
{
config->tty = 0; /* default to current tty */
config->device = NULL;
config->seat_id = NULL;
}

View File

@ -32,7 +32,7 @@ struct weston_launcher;
struct launcher_interface {
char *name;
int (* connect) (struct weston_launcher **launcher_out, struct weston_compositor *compositor,
int tty, const char *seat_id, bool sync_drm);
const char *seat_id, bool sync_drm);
void (* destroy) (struct weston_launcher *launcher);
int (* open) (struct weston_launcher *launcher, const char *path, int flags);
void (* close) (struct weston_launcher *launcher, int fd);

View File

@ -181,7 +181,7 @@ libseat_event(int fd, uint32_t mask, void *data)
static int
seat_open(struct weston_launcher **out, struct weston_compositor *compositor,
int tty, const char *seat_id, bool sync_drm)
const char *seat_id, bool sync_drm)
{
struct launcher_libseat *wl;
struct wl_event_loop *event_loop;

View File

@ -736,7 +736,7 @@ launcher_logind_get_session(char **session)
static int
launcher_logind_connect(struct weston_launcher **out, struct weston_compositor *compositor,
int tty, const char *seat_id, bool sync_drm)
const char *seat_id, bool sync_drm)
{
struct launcher_logind *wl;
struct wl_event_loop *loop;
@ -784,11 +784,6 @@ launcher_logind_connect(struct weston_launcher **out, struct weston_compositor *
if (r < 0) {
weston_log("logind: session not running on a VT\n");
goto err_session;
} else if (tty > 0 && wl->vtnr != (unsigned int )tty) {
weston_log("logind: requested VT --tty=%d differs from real session VT %u\n",
tty, wl->vtnr);
r = -EINVAL;
goto err_session;
}
} else if (r < 0) {
weston_log("logind: could not determine if seat %s has ttys or not", t);

View File

@ -47,7 +47,7 @@ static const struct launcher_interface *ifaces[] = {
};
WL_EXPORT struct weston_launcher *
weston_launcher_connect(struct weston_compositor *compositor, int tty,
weston_launcher_connect(struct weston_compositor *compositor,
const char *seat_id, bool sync_drm)
{
const struct launcher_interface **it;
@ -57,7 +57,7 @@ weston_launcher_connect(struct weston_compositor *compositor, int tty,
struct weston_launcher *launcher;
weston_log("Trying %s launcher...\n", iface->name);
if (iface->connect(&launcher, compositor, tty, seat_id, sync_drm) == 0)
if (iface->connect(&launcher, compositor, seat_id, sync_drm) == 0)
return launcher;
}

View File

@ -33,7 +33,7 @@
struct weston_launcher;
struct weston_launcher *
weston_launcher_connect(struct weston_compositor *compositor, int tty,
weston_launcher_connect(struct weston_compositor *compositor,
const char *seat_id, bool sync_drm);
void

View File

@ -186,11 +186,6 @@ Use graphics and input devices designated for seat
instead of the seat defined in the environment variable
.BR XDG_SEAT ". If neither is specified, seat0 will be assumed."
.TP
\fB\-\-tty\fR=\fIx\fR
Launch Weston on tty
.I x
instead of using the current tty.
.TP
.B \-\-continue\-without\-input
Allow Weston to start without input devices. Used for testing purposes.
.