Re: [PATCH] tty: Add sysfs symlink for console name->tty device

2014-02-28 Thread Peter Hurley

On 02/28/2014 07:35 PM, Greg Kroah-Hartman wrote:

On Wed, Feb 26, 2014 at 09:40:51AM -0500, Peter Hurley wrote:

Enable a user-space process to discover the underlying tty device
for a console, if one exists, and when the tty device is later
created or destroyed.


What userspace code has been tested with this change?


Every existing distro + personal copies going back 42 versions.
No breakage. ;)


Add sysfs symlinks for registered consoles to their respective
devices in [sys/class,sys/devices/virtual]/tty/console.
Scan consoles at tty device (un)registration to handle deferred
console<->device (un)binding.


I don't understand, what does userspace now look like in sysfs?  Do we
need Documentation/ABI/ updates here?

And David has fixed up his original patch, which doesn't break plymouth,
and I'll be taking that, so I don't see why this patch is needed.


Ok. I tried.

Regards,
Peter Hurley

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


Re: [PATCH] tty: Add sysfs symlink for console name->tty device

2014-02-28 Thread Greg Kroah-Hartman
On Wed, Feb 26, 2014 at 09:40:51AM -0500, Peter Hurley wrote:
> Enable a user-space process to discover the underlying tty device
> for a console, if one exists, and when the tty device is later
> created or destroyed.

What userspace code has been tested with this change?

> Add sysfs symlinks for registered consoles to their respective
> devices in [sys/class,sys/devices/virtual]/tty/console.
> Scan consoles at tty device (un)registration to handle deferred
> console<->device (un)binding.

I don't understand, what does userspace now look like in sysfs?  Do we
need Documentation/ABI/ updates here?

And David has fixed up his original patch, which doesn't break plymouth,
and I'll be taking that, so I don't see why this patch is needed.

thanks,

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


Re: [PATCH] tty: Add sysfs symlink for console name->tty device

2014-02-27 Thread Peter Hurley

On 02/27/2014 08:36 AM, Kay Sievers wrote:

On Thu, Feb 27, 2014 at 2:31 PM, Peter Hurley  wrote:

On 02/27/2014 06:13 AM, Kay Sievers wrote:


On Wed, Feb 26, 2014 at 3:40 PM, Peter Hurley 
wrote:


Enable a user-space process to discover the underlying tty device
for a console, if one exists, and when the tty device is later
created or destroyed.

Add sysfs symlinks for registered consoles to their respective
devices in [sys/class,sys/devices/virtual]/tty/console.
Scan consoles at tty device (un)registration to handle deferred
console<->device (un)binding.


What tool is supposed to read that? I can't think of anything
interested in this, as soon as we have fixed the "active" console
output.



With all due respect, that "fix" is a ridiculous hack,


No, it is not. It's fine to handle tty0 special, as it is special.


I wasn't just referring to the plymouth workaround.


being done
for self-serving expedience.


I don't see the problem.


It already caused one user-space breakage
which you did not expect.


That is normal way to do things, only people who don't do things don't
break things. And broken things get fixed, and the "active" file is still
fixable, and that is what we should do.


But what's the plan when more user-space breakage is uncovered after that
change has been in 10 kernel releases?

Then everyone will point to how much user-space breakage reverting it
will cause.


We don't need to invent new things because we did not get things right
with the first try.


This sysfs interface is superior in every way.


But nothing uses it now, and probably never will, so I don't see the
need for it at this moment.


Let's just avoid the mess right up-front.

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


Re: [PATCH] tty: Add sysfs symlink for console name->tty device

2014-02-27 Thread Kay Sievers
On Thu, Feb 27, 2014 at 2:31 PM, Peter Hurley  wrote:
> On 02/27/2014 06:13 AM, Kay Sievers wrote:
>>
>> On Wed, Feb 26, 2014 at 3:40 PM, Peter Hurley 
>> wrote:
>>>
>>> Enable a user-space process to discover the underlying tty device
>>> for a console, if one exists, and when the tty device is later
>>> created or destroyed.
>>>
>>> Add sysfs symlinks for registered consoles to their respective
>>> devices in [sys/class,sys/devices/virtual]/tty/console.
>>> Scan consoles at tty device (un)registration to handle deferred
>>> console<->device (un)binding.
>>
>> What tool is supposed to read that? I can't think of anything
>> interested in this, as soon as we have fixed the "active" console
>> output.

> With all due respect, that "fix" is a ridiculous hack,

No, it is not. It's fine to handle tty0 special, as it is special.

> being done
> for self-serving expedience.

I don't see the problem.

> It already caused one user-space breakage
> which you did not expect.

That is normal way to do things, only people who don't do things don't
break things. And broken things get fixed, and the "active" file is still
fixable, and that is what we should do.

We don't need to invent new things because we did not get things right
with the first try.

> This sysfs interface is superior in every way.

But nothing uses it now, and probably never will, so I don't see the
need for it at this moment.

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


Re: [PATCH] tty: Add sysfs symlink for console name->tty device

2014-02-27 Thread Peter Hurley

On 02/27/2014 06:13 AM, Kay Sievers wrote:

On Wed, Feb 26, 2014 at 3:40 PM, Peter Hurley  wrote:

Enable a user-space process to discover the underlying tty device
for a console, if one exists, and when the tty device is later
created or destroyed.

Add sysfs symlinks for registered consoles to their respective
devices in [sys/class,sys/devices/virtual]/tty/console.
Scan consoles at tty device (un)registration to handle deferred
console<->device (un)binding.


What tool is supposed to read that? I can't think of anything
interested in this, as soon as we have fixed the "active" console
output.


Kay,

With all due respect, that "fix" is a ridiculous hack, being done
for self-serving expedience. It already caused one user-space breakage
which you did not expect.

This sysfs interface is superior in every way.

Regards,
Peter Hurley

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


Re: [PATCH] tty: Add sysfs symlink for console name->tty device

2014-02-27 Thread Kay Sievers
On Wed, Feb 26, 2014 at 3:40 PM, Peter Hurley  wrote:
> Enable a user-space process to discover the underlying tty device
> for a console, if one exists, and when the tty device is later
> created or destroyed.
>
> Add sysfs symlinks for registered consoles to their respective
> devices in [sys/class,sys/devices/virtual]/tty/console.
> Scan consoles at tty device (un)registration to handle deferred
> console<->device (un)binding.

What tool is supposed to read that? I can't think of anything
interested in this, as soon as we have fixed the "active" console
output.

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