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>
dev
Derek Foreman 3 years ago
parent a96dfc7098
commit 2c91c70250
  1. 4
      compositor/main.c
  2. 5
      include/libweston/backend-drm.h
  3. 3
      include/libweston/backend-fbdev.h
  4. 3
      libweston/backend-drm/drm.c
  5. 3
      libweston/backend-fbdev/fbdev.c
  6. 2
      libweston/launcher-impl.h
  7. 2
      libweston/launcher-libseat.c
  8. 7
      libweston/launcher-logind.c
  9. 4
      libweston/launcher-util.c
  10. 2
      libweston/launcher-util.h
  11. 5
      man/weston-drm.man

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

@ -35,7 +35,7 @@
extern "C" { extern "C" {
#endif #endif
#define WESTON_DRM_BACKEND_CONFIG_VERSION 4 #define WESTON_DRM_BACKEND_CONFIG_VERSION 5
struct libinput_device; struct libinput_device;
@ -171,9 +171,6 @@ weston_drm_virtual_output_get_api(struct weston_compositor *compositor)
struct weston_drm_backend_config { struct weston_drm_backend_config {
struct weston_backend_config base; 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. */ /** Whether to use the pixman renderer instead of the OpenGL ES renderer. */
bool use_pixman; bool use_pixman;

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

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

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

@ -32,7 +32,7 @@ struct weston_launcher;
struct launcher_interface { struct launcher_interface {
char *name; char *name;
int (* connect) (struct weston_launcher **launcher_out, struct weston_compositor *compositor, 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); void (* destroy) (struct weston_launcher *launcher);
int (* open) (struct weston_launcher *launcher, const char *path, int flags); int (* open) (struct weston_launcher *launcher, const char *path, int flags);
void (* close) (struct weston_launcher *launcher, int fd); void (* close) (struct weston_launcher *launcher, int fd);

@ -181,7 +181,7 @@ libseat_event(int fd, uint32_t mask, void *data)
static int static int
seat_open(struct weston_launcher **out, struct weston_compositor *compositor, 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 launcher_libseat *wl;
struct wl_event_loop *event_loop; struct wl_event_loop *event_loop;

@ -736,7 +736,7 @@ launcher_logind_get_session(char **session)
static int static int
launcher_logind_connect(struct weston_launcher **out, struct weston_compositor *compositor, 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 launcher_logind *wl;
struct wl_event_loop *loop; struct wl_event_loop *loop;
@ -784,11 +784,6 @@ launcher_logind_connect(struct weston_launcher **out, struct weston_compositor *
if (r < 0) { if (r < 0) {
weston_log("logind: session not running on a VT\n"); weston_log("logind: session not running on a VT\n");
goto err_session; 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) { } else if (r < 0) {
weston_log("logind: could not determine if seat %s has ttys or not", t); weston_log("logind: could not determine if seat %s has ttys or not", t);

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

@ -33,7 +33,7 @@
struct weston_launcher; struct weston_launcher;
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); const char *seat_id, bool sync_drm);
void void

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

Loading…
Cancel
Save