[systemd-devel] PATCH: fix logind on xen

Lennart Poettering lennart at poettering.net
Tue Jan 3 12:35:12 PST 2012


On Tue, 03.01.12 14:27, Frederic Crozat (fcrozat at suse.com) wrote:

> Le lundi 19 décembre 2011 à 17:23 +0100, Frederic Crozat a écrit :
> > Hi,
> > 
> > currently, logind was enforcing the presence of /dev/tty0 to start
> > properly. This device is not present on Xen (when using xencons=tty) or
> > S/390.
> 
> Here is a regenerated version against master, since logind was moved to
> its own directory.

Thanks for rebasing the patch!

I fear the patch is not complete though. seat_read_active_vt() in
login/logind-seat.c needs to guard against the invalid fd in
s->manager->console_active_fd.

Also, I assume that if /dev/tty0 doesn't exist /dev/tty1, /dev/tty2 and
so on don't exist either. That means calls like seat_preallocate_vts()
need to be shortcut in this case, too.

logind currently implicitly and always creates a seat0, that exists
unconditionally, and that all hw that isn't assigned to anything else
belongs to. That notion is probably nothing we could or should get rid
off that easily, but that means that we need to make sure that a couple
of its operations become NOPs on the systems in question. Besides
seat_preallocate_vts() that's  seat_read_active_vt() and the whole logic
that watches VCSA devices (which should be shortcut, as if n_autovts was
0, in manager_connect_udev()).

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list