seat: pass allowed VTs from caller

We should handle everything --listen related in kmscon_main so pass in the
allowed-VTs mask from the caller.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann committed 2012-12-09 13:26:45 +01:00
1 parent b985e55d3a
commit add239ee2c
3 files changed
+9 -8

No files matched your search

+6 -2
View File
@@ -147,7 +147,7 @@ static int app_seat_new(struct kmscon_app *app, struct app_seat **out,
{
struct app_seat *seat;
int ret;
unsigned int i;
unsigned int i, types;
bool found;
found = false;
@@ -186,8 +186,12 @@ static int app_seat_new(struct kmscon_app *app, struct app_seat **out,
goto err_free;
}
types = UTERM_VT_FAKE;
if (!app->conf->listen)
types |= UTERM_VT_REAL;
ret = kmscon_seat_new(&seat->seat, app->conf_ctx, app->eloop, app->vtm,
sname, app_seat_event, seat);
types, sname, app_seat_event, seat);
if (ret) {
if (ret == -ERANGE)
log_debug("ignoring seat %s as it already has a seat manager",
+2 -6
View File
@@ -631,6 +631,7 @@ int kmscon_seat_new(struct kmscon_seat **out,
struct conf_ctx *main_conf,
struct ev_eloop *eloop,
struct uterm_vt_master *vtm,
unsigned int vt_types,
const char *seatname,
kmscon_seat_cb_t cb,
void *data)
@@ -638,7 +639,6 @@ int kmscon_seat_new(struct kmscon_seat **out,
struct kmscon_seat *seat;
int ret;
struct kmscon_session *s;
unsigned int allowed_types;
if (!out || !eloop || !vtm || !seatname)
return -EINVAL;
@@ -689,12 +689,8 @@ int kmscon_seat_new(struct kmscon_seat **out,
if (ret)
goto err_input;
allowed_types = UTERM_VT_FAKE;
if (!seat->conf->listen)
allowed_types |= UTERM_VT_REAL;
ret = uterm_vt_allocate(seat->vtm, &seat->vt,
allowed_types, seat->name,
vt_types, seat->name,
seat->input, seat->conf->vt, seat_vt_event,
seat);
if (ret)
+1
View File
@@ -74,6 +74,7 @@ int kmscon_seat_new(struct kmscon_seat **out,
struct conf_ctx *main_conf,
struct ev_eloop *eloop,
struct uterm_vt_master *vtm,
unsigned int vt_types,
const char *seatname,
kmscon_seat_cb_t cb,
void *data);