chiark / gitweb /
logind: extract has_vts() from can_multi_session()
[elogind.git] / src / login / logind-dbus.c
index 113a2b73b6289f0a068f0cb17d0a1fd1d8194ef7..fd8ee1b80123e5ea25ca22534660496960fb7125 100644 (file)
@@ -404,8 +404,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) {
                 int v;
 
                 if (!seat)
-                        seat = m->vtconsole;
-                else if (seat != m->vtconsole)
+                        seat = m->seat0;
+                else if (seat != m->seat0)
                         return -EINVAL;
 
                 v = vtnr_from_tty(tty);
@@ -420,8 +420,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) {
         } else if (tty_is_console(tty)) {
 
                 if (!seat)
-                        seat = m->vtconsole;
-                else if (seat != m->vtconsole)
+                        seat = m->seat0;
+                else if (seat != m->seat0)
                         return -EINVAL;
 
                 if (vtnr != 0)
@@ -429,7 +429,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) {
         }
 
         if (seat) {
-                if (seat_can_multi_session(seat)) {
+                if (seat_has_vts(seat)) {
                         if (vtnr > 63)
                                 return -EINVAL;
                 } else {