seat: register cdev session only when --cdev is given
We cannot have multiple instances of kmscon running with cdev emulation, so disable it by default. A kmscon-system-daemon now needs --cdev if you want fake VTs to work. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
0da912fbbd
commit
1796e33441
@ -71,6 +71,7 @@ static void print_help()
|
||||
"\t-s, --switchvt [on] Automatically switch to VT\n"
|
||||
"\t --seats <list,of,seats> [seat0] Select seats or pass 'all' to make\n"
|
||||
"\t kmscon run on all seats\n"
|
||||
"\t --cdev [off] Emulate kernel VTs\n"
|
||||
"\n"
|
||||
"Session Options:\n"
|
||||
"\t --session-max <max> [50] Maximum number of sessions\n"
|
||||
@ -458,6 +459,7 @@ int kmscon_conf_new(struct conf_ctx **out)
|
||||
CONF_OPTION(0, 0, "vt", &conf_vt, NULL, NULL, NULL, &conf->vt, NULL),
|
||||
CONF_OPTION_BOOL('s', "switchvt", &conf->switchvt, true),
|
||||
CONF_OPTION_STRING_LIST(0, "seats", &conf->seats, def_seats),
|
||||
CONF_OPTION_BOOL(0, "cdev", &conf->cdev, false),
|
||||
|
||||
/* Session Options */
|
||||
CONF_OPTION_UINT(0, "session-max", &conf->session_max, 50),
|
||||
|
@ -57,6 +57,8 @@ struct kmscon_conf_t {
|
||||
bool switchvt;
|
||||
/* seats */
|
||||
char **seats;
|
||||
/* cdev */
|
||||
bool cdev;
|
||||
|
||||
/* Session Options */
|
||||
/* sessions */
|
||||
|
@ -690,11 +690,13 @@ int kmscon_seat_new(struct kmscon_seat **out,
|
||||
else
|
||||
kmscon_session_enable(s);
|
||||
|
||||
ret = kmscon_cdev_register(&s, seat);
|
||||
if (ret == -EOPNOTSUPP)
|
||||
log_notice("cdev sessions not compiled in");
|
||||
else if (ret)
|
||||
log_error("cannot register cdev session: %d", ret);
|
||||
if (seat->conf->cdev) {
|
||||
ret = kmscon_cdev_register(&s, seat);
|
||||
if (ret == -EOPNOTSUPP)
|
||||
log_notice("cdev sessions not compiled in");
|
||||
else if (ret)
|
||||
log_error("cannot register cdev session: %d", ret);
|
||||
}
|
||||
|
||||
ret = kmscon_compositor_register(&s, seat);
|
||||
if (ret == -EOPNOTSUPP)
|
||||
|
Loading…
x
Reference in New Issue
Block a user