Re: tty: add 'active' sysfs attribute to tty0 and console device

From: Alan Cox
Date: Thu Nov 18 2010 - 07:59:39 EST


> Example: running a boot script on /dev/console and after fsck
> sulogin has to called to be able to asked the system admin.
> Now the question is which console device the system admin is
> waiting in front of (before /dev/ttyS0 or /dev/tty3270 or whatever).

Ok that is a rather nebulous concept for embedded. The answer probably
being that the true console device has no input facility.

> I'm aware of. For using tty devices of the system console it requires
> to have e.g. with my patch:
>
> bash> cat /proc/tty/consoles
> tty0 -WU (ECp) 4:7
>
> the `W' flag for write and the major:minor pair, beside this the `U'
> flag indicates the tty can do an unblank operation, the `-' shows that
> there is no read operation (never seen such a console tty). On an other

Try the lp printer console if you want a test case

> to detect the primary console device here.

Why not just open /dev/console ?

Alan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/