From 63298eb881c4f59e91bc4d39abad9e2dc5d4ba79 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 2 Dec 2012 12:29:18 +0100 Subject: [PATCH] conf: improve --vt warning by allowing --seats=,all If a seat is called "all" and we want to use it as single seat, we currently have to pass "--seats=all," or "--seats=,all" etc. so it is not detected as --seats=all. However, our warning when --vt is used with it does not respect this. Improve this warning to detect this case and correctly ignore it then. Signed-off-by: David Herrmann --- src/kmscon_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kmscon_conf.c b/src/kmscon_conf.c index 411774a..6c5f44b 100644 --- a/src/kmscon_conf.c +++ b/src/kmscon_conf.c @@ -409,7 +409,7 @@ static int aftercheck_vt(struct conf_option *opt, int argc, char **argv, return 0; if (shl_string_list_is(conf->seats, "all") || - !conf->seats[0] || conf->seats[1]) + shl_string_list_count(conf->seats, true) != 1) log_warning("you should use --vt only if --seats contains exactly one seat"); return 0;