| From | Sent On | Attachments |
|---|---|---|
| Kay Sievers | Nov 16, 2010 7:46 am | |
| Alan Cox | Nov 16, 2010 7:56 am | |
| Kay Sievers | Nov 16, 2010 8:12 am | |
| Alan Cox | Nov 16, 2010 9:14 am | |
| Kay Sievers | Nov 16, 2010 10:51 am | |
| Alan Cox | Nov 16, 2010 11:55 am | |
| Kay Sievers | Nov 16, 2010 12:15 pm | |
| Alan Cox | Nov 16, 2010 12:48 pm | |
| Kay Sievers | Nov 16, 2010 1:28 pm | |
| Lennart Poettering | Nov 16, 2010 1:35 pm | |
| Lennart Poettering | Nov 16, 2010 1:42 pm | |
| Alan Cox | Nov 16, 2010 2:51 pm | |
| Alan Cox | Nov 16, 2010 2:55 pm | |
| Lennart Poettering | Nov 16, 2010 2:58 pm | |
| Alan Cox | Nov 16, 2010 3:04 pm | |
| Lennart Poettering | Nov 16, 2010 3:10 pm | |
| Lennart Poettering | Nov 16, 2010 3:18 pm | |
| Alan Cox | Nov 16, 2010 3:45 pm | |
| Etched Pixels | Nov 16, 2010 3:49 pm | |
| John Stoffel | Nov 17, 2010 8:31 am | |
| Vald...@vt.edu | Nov 17, 2010 2:00 pm | |
| Kay Sievers | Nov 17, 2010 3:39 pm | |
| Alan Cox | Nov 17, 2010 3:56 pm | |
| Greg KH | Nov 17, 2010 5:27 pm | |
| Lennart Poettering | Nov 17, 2010 5:48 pm | |
| Greg KH | Nov 17, 2010 5:52 pm | |
| Lennart Poettering | Nov 17, 2010 6:28 pm | |
| Alan Cox | Nov 18, 2010 2:14 am | |
| Dr. Werner Fink | Nov 18, 2010 2:59 am | |
| Alan Cox | Nov 18, 2010 3:23 am | |
| Kay Sievers | Nov 18, 2010 3:54 am | |
| Kay Sievers | Nov 18, 2010 4:03 am | |
| Dr. Werner Fink | Nov 18, 2010 4:12 am | |
| Alan Cox | Nov 18, 2010 4:57 am | |
| Alan Cox | Nov 18, 2010 5:00 am | |
| Dr. Werner Fink | Nov 18, 2010 5:13 am | |
| Alan Cox | Nov 18, 2010 6:41 am | |
| Dr. Werner Fink | Nov 19, 2010 5:21 am | |
| Alan Cox | Nov 19, 2010 7:46 am | |
| Dr. Werner Fink | Nov 19, 2010 9:06 am | .tiocgdev |
| Greg KH | Nov 19, 2010 10:02 am | |
| Dr. Werner Fink | Nov 19, 2010 10:41 am | |
| Alan Cox | Nov 20, 2010 4:39 am | |
| Dr. Werner Fink | Dec 1, 2010 3:15 am | |
| Dr. Werner Fink | Dec 1, 2010 4:31 am | .tiocgdev |
| Dr. Werner Fink | Dec 3, 2010 3:47 am | .Other |
| Subject: | Re: tty: add 'active' sysfs attribute to tty0 and console device | |
|---|---|---|
| From: | Dr. Werner Fink (wer...@suse.de) | |
| Date: | Nov 18, 2010 4:12:22 am | |
| List: | org.kernel.vger.linux-kernel | |
On Thu, Nov 18, 2010 at 11:23:35AM +0000, Alan Cox wrote:
is the most pressing case e.g. on s390 or zSeries) and this without forcing (and maybe stealing) the controlling tty on the system console to be able to detect the primary tty/console.
What do you mean by console in this context
The console in printk context and the "console" in "active vt window" are unrelated concepts with the same name, so its a bit confusing to follow here.
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).
facilities (having device, read, write, and unblank) are also shown in the new file /sys/class/tty/console/active ... but maybe Randy could says a few words for what this is usable.
The system console does not even need to be a tty device, and on many embedded devices is not (it may for example by a RAM buffer not wiped over reboots or it may be jtag or MIPI trace ports.
"tty0" is *currently* a shorthand for "the VT the keyboard/display are showing". That's a shorthand that in itself will make no sense in future.
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 system here I see:
bash> cat /proc/tty/consoles ttyS0 -W- (ECp) 4:64 tty0 -WU (Ep) 4:1
which I'm using in user space with
dev_t dev = 0; FILE * fc;
if ((fc = fopen("/proc/tty/consoles", "r"))) {
char fbuf[16];
int maj, min;
while ((fscanf(fc, "%*s %*s (%[^)]) %d:%d", &fbuf[0], &maj, &min) == 3))
{
if (!strchr(fbuf, 'E'))
continue;
if (strchr(fbuf, 'C')) {
dev = makedev(maj, min);
break;
}
}
fclose(fc);
}
to detect the primary console device here.
Werner
-- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majo...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/






.tiocgdev