lkml.org 
[lkml]   [2014]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.13 35/99] tty: Set correct tty name in active sysfs attribute
On 02/22/2014 08:25 AM, David Herrmann wrote:
> Hi
>
> On Fri, Feb 21, 2014 at 11:53 PM, Ray Strode <halfline@gmail.com> wrote:
>> Hi,
>>
>> On Fri, Feb 21, 2014 at 11:01 AM, Kay Sievers <kay@vrfy.org> wrote:
>>> Why did the tty0 change to tty1 now? That doesn't look like a "driver
>>> name" vs. "device name" issue?
>>
>> I don't know if it's intentional, but the patch does:
>> + int index = cs[i]->index;
>> ...
>> + driver = cs[i]->device(cs[i], &index);
>>
>> which will presumably change the index from 0 to 1 because of this code:
>>
>> static struct tty_driver *vt_console_device(struct console *c, int *index)
>> {
>> *index = c->index ? c->index-1 : fg_console;
>> return console_driver;
>> }
>>
>> At least that's what it looks like is causing the problem from
>> browsing through the source a bit.
>
> Yepp, that's it. So if you configure the console to always be
> redirected to the foreground terminal, you simply bind it to tty0 and
> this file used to return tty0 then.
> With this patch, we actually return the foreground terminal instead,
> so tty0 is resolved to the real VT. This sounds like the correct
> behavior (even though it currently breaks poll() on this file). But if
> it breaks stuff, we should revert it and add a second file just like
> Peter suggested.

Or add sysfs entries for each console that exposes the device, so
that the underlying device is trivially discoverable, which is the
original problem.

Regards,
Peter Hurley



\
 
 \ /
  Last update: 2014-02-22 15:21    [W:0.623 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site