* [PATCH][RFC] Delete export of tty.h to userspace.
@ 2007-07-18 9:24 Robert P. J. Day
2007-07-18 20:18 ` Jiri Slaby
0 siblings, 1 reply; 9+ messages in thread
From: Robert P. J. Day @ 2007-07-18 9:24 UTC (permalink / raw)
To: Linux Kernel Mailing List
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
---
given that the entire contents of include/linux/tty.h is contained
within an "#ifdef __KERNEL__", it seems pointless to export it to
userspace, unless there's some kind of need for that header file to
exist in userspace, even if it's empty.
a quick grep shows that nothing under /usr/include references any
file of the name "tty.h" in any way. thoughts?
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 4ff0f57..63de91a 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -328,7 +327,6 @@ unifdef-y += sysctl.h
unifdef-y += tcp.h
unifdef-y += time.h
unifdef-y += timex.h
-unifdef-y += tty.h
unifdef-y += types.h
unifdef-y += udf_fs_i.h
unifdef-y += udp.h
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-18 9:24 [PATCH][RFC] Delete export of tty.h to userspace Robert P. J. Day
@ 2007-07-18 20:18 ` Jiri Slaby
2007-07-18 20:33 ` Robert P. J. Day
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2007-07-18 20:18 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Alan Cox
Robert P. J. Day napsal(a):
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
>
> ---
>
> given that the entire contents of include/linux/tty.h is contained
> within an "#ifdef __KERNEL__", it seems pointless to export it to
> userspace, unless there's some kind of need for that header file to
> exist in userspace, even if it's empty.
>
> a quick grep shows that nothing under /usr/include references any
> file of the name "tty.h" in any way. thoughts?
If we decide to remove the file, I would rather go through deprecation of the
file with filing an entry in feature-remove-schedule. There still seems to be
some users of the file.
With deprecation done with sth. like
#ifndef __KERNEL__
#warning Don't include this file from userspace, it's emtpy.
#endif
> diff --git a/include/linux/Kbuild b/include/linux/Kbuild
> index 4ff0f57..63de91a 100644
> --- a/include/linux/Kbuild
> +++ b/include/linux/Kbuild
> @@ -328,7 +327,6 @@ unifdef-y += sysctl.h
> unifdef-y += tcp.h
> unifdef-y += time.h
> unifdef-y += timex.h
> -unifdef-y += tty.h
> unifdef-y += types.h
> unifdef-y += udf_fs_i.h
> unifdef-y += udp.h
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-18 20:18 ` Jiri Slaby
@ 2007-07-18 20:33 ` Robert P. J. Day
2007-07-18 22:38 ` Karel Zak
0 siblings, 1 reply; 9+ messages in thread
From: Robert P. J. Day @ 2007-07-18 20:33 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List, Alan Cox
On Wed, 18 Jul 2007, Jiri Slaby wrote:
> Robert P. J. Day napsal(a):
> > Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> >
> > ---
> >
> > given that the entire contents of include/linux/tty.h is contained
> > within an "#ifdef __KERNEL__", it seems pointless to export it to
> > userspace, unless there's some kind of need for that header file to
> > exist in userspace, even if it's empty.
> >
> > a quick grep shows that nothing under /usr/include references any
> > file of the name "tty.h" in any way. thoughts?
>
> If we decide to remove the file, I would rather go through
> deprecation of the file with filing an entry in
> feature-remove-schedule. There still seems to be some users of the
> file.
i'm curious -- how did you determine that?
> With deprecation done with sth. like
> #ifndef __KERNEL__
> #warning Don't include this file from userspace, it's emtpy.
> #endif
yes, that makes sense. i can do that.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-18 20:33 ` Robert P. J. Day
@ 2007-07-18 22:38 ` Karel Zak
2007-07-19 11:17 ` Robert P. J. Day
0 siblings, 1 reply; 9+ messages in thread
From: Karel Zak @ 2007-07-18 22:38 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Jiri Slaby, Linux Kernel Mailing List, Alan Cox
On Wed, Jul 18, 2007 at 04:33:12PM -0400, Robert P. J. Day wrote:
> On Wed, 18 Jul 2007, Jiri Slaby wrote:
>
> > Robert P. J. Day napsal(a):
> > > given that the entire contents of include/linux/tty.h is contained
> > > within an "#ifdef __KERNEL__", it seems pointless to export it to
> > > userspace, unless there's some kind of need for that header file to
> > > exist in userspace, even if it's empty.
> > >
> > > a quick grep shows that nothing under /usr/include references any
> > > file of the name "tty.h" in any way. thoughts?
> >
> > If we decide to remove the file, I would rather go through
> > deprecation of the file with filing an entry in
> > feature-remove-schedule. There still seems to be some users of the
> > file.
>
> i'm curious -- how did you determine that?
$ grep "tty.h" util-linux/sys-utils/cytune.c
#include <linux/tty.h>
... I'll fix it in util-linux-ng.
Karel
--
Karel Zak <kzak@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-18 22:38 ` Karel Zak
@ 2007-07-19 11:17 ` Robert P. J. Day
2007-07-19 13:57 ` Christoph Hellwig
0 siblings, 1 reply; 9+ messages in thread
From: Robert P. J. Day @ 2007-07-19 11:17 UTC (permalink / raw)
To: Karel Zak; +Cc: Jiri Slaby, Linux Kernel Mailing List, Alan Cox
On Thu, 19 Jul 2007, Karel Zak wrote:
> On Wed, Jul 18, 2007 at 04:33:12PM -0400, Robert P. J. Day wrote:
> > On Wed, 18 Jul 2007, Jiri Slaby wrote:
> >
> > > Robert P. J. Day napsal(a):
> > > > given that the entire contents of include/linux/tty.h is contained
> > > > within an "#ifdef __KERNEL__", it seems pointless to export it to
> > > > userspace, unless there's some kind of need for that header file to
> > > > exist in userspace, even if it's empty.
> > > >
> > > > a quick grep shows that nothing under /usr/include references any
> > > > file of the name "tty.h" in any way. thoughts?
> > >
> > > If we decide to remove the file, I would rather go through
> > > deprecation of the file with filing an entry in
> > > feature-remove-schedule. There still seems to be some users of the
> > > file.
> >
> > i'm curious -- how did you determine that?
>
> $ grep "tty.h" util-linux/sys-utils/cytune.c
> #include <linux/tty.h>
>
> ... I'll fix it in util-linux-ng.
so you're saying you'll drop that include from util-linux, is that it?
but it's still a good plan to generate a warning whenever userspace
includes that file, so i'll submit a quick patch to generate that,
based on jiri's suggestion.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-19 11:17 ` Robert P. J. Day
@ 2007-07-19 13:57 ` Christoph Hellwig
2007-07-19 15:27 ` Robert P. J. Day
2007-07-19 15:32 ` Jiri Slaby
0 siblings, 2 replies; 9+ messages in thread
From: Christoph Hellwig @ 2007-07-19 13:57 UTC (permalink / raw)
To: Robert P. J. Day
Cc: Karel Zak, Jiri Slaby, Linux Kernel Mailing List, Alan Cox
On Thu, Jul 19, 2007 at 07:17:07AM -0400, Robert P. J. Day wrote:
> so you're saying you'll drop that include from util-linux, is that it?
> but it's still a good plan to generate a warning whenever userspace
> includes that file, so i'll submit a quick patch to generate that,
> based on jiri's suggestion.
Not exporting it at all gives an error which is a lot better. Just look
at all the warnings most userspace spews, they'd never even notice it
otherwise.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-19 13:57 ` Christoph Hellwig
@ 2007-07-19 15:27 ` Robert P. J. Day
2007-07-19 15:32 ` Jiri Slaby
1 sibling, 0 replies; 9+ messages in thread
From: Robert P. J. Day @ 2007-07-19 15:27 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Karel Zak, Jiri Slaby, Linux Kernel Mailing List, Alan Cox
On Thu, 19 Jul 2007, Christoph Hellwig wrote:
> On Thu, Jul 19, 2007 at 07:17:07AM -0400, Robert P. J. Day wrote:
> > so you're saying you'll drop that include from util-linux, is that
> > it? but it's still a good plan to generate a warning whenever
> > userspace includes that file, so i'll submit a quick patch to
> > generate that, based on jiri's suggestion.
>
> Not exporting it at all gives an error which is a lot better. Just
> look at all the warnings most userspace spews, they'd never even
> notice it otherwise.
i'm fine either way, i just didn't want to gratuitously break
userspace. someone higher up the food chain is welcome to make the
decision here.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-19 13:57 ` Christoph Hellwig
2007-07-19 15:27 ` Robert P. J. Day
@ 2007-07-19 15:32 ` Jiri Slaby
2007-07-19 16:10 ` Robert P. J. Day
1 sibling, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2007-07-19 15:32 UTC (permalink / raw)
To: Christoph Hellwig, Robert P. J. Day, Karel Zak, Jiri Slaby,
Linux Kernel Mailing List, Alan Cox
Christoph Hellwig napsal(a):
> On Thu, Jul 19, 2007 at 07:17:07AM -0400, Robert P. J. Day wrote:
>> so you're saying you'll drop that include from util-linux, is that it?
>> but it's still a good plan to generate a warning whenever userspace
>> includes that file, so i'll submit a quick patch to generate that,
>> based on jiri's suggestion.
>
> Not exporting it at all gives an error which is a lot better. Just look
> at all the warnings most userspace spews, they'd never even notice it
> otherwise.
Not directly responding to this, but keeping CCs. I though of the removal one
more time and there is one more issue (maybe). Every exported kernel header,
which includes this file outside #ifdef __KERNEL__ #endif will be broken in
userspace. Are you sure, there are no such includes?
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH][RFC] Delete export of tty.h to userspace.
2007-07-19 15:32 ` Jiri Slaby
@ 2007-07-19 16:10 ` Robert P. J. Day
0 siblings, 0 replies; 9+ messages in thread
From: Robert P. J. Day @ 2007-07-19 16:10 UTC (permalink / raw)
To: Jiri Slaby
Cc: Christoph Hellwig, Karel Zak, Linux Kernel Mailing List, Alan Cox
On Thu, 19 Jul 2007, Jiri Slaby wrote:
> Christoph Hellwig napsal(a):
> > On Thu, Jul 19, 2007 at 07:17:07AM -0400, Robert P. J. Day wrote:
> >> so you're saying you'll drop that include from util-linux, is
> >> that it? but it's still a good plan to generate a warning
> >> whenever userspace includes that file, so i'll submit a quick
> >> patch to generate that, based on jiri's suggestion.
> >
> > Not exporting it at all gives an error which is a lot better.
> > Just look at all the warnings most userspace spews, they'd never
> > even notice it otherwise.
>
> Not directly responding to this, but keeping CCs. I though of the
> removal one more time and there is one more issue (maybe). Every
> exported kernel header, which includes this file outside #ifdef
> __KERNEL__ #endif will be broken in userspace. Are you sure, there
> are no such includes?
yes, i checked the output from "make headers_install" as my first test
before proposing this. there's nothing anywhere in that output that
includes tty.h. that is, as long as i didn't screw up somewhere along
the way.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-07-19 16:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-18 9:24 [PATCH][RFC] Delete export of tty.h to userspace Robert P. J. Day
2007-07-18 20:18 ` Jiri Slaby
2007-07-18 20:33 ` Robert P. J. Day
2007-07-18 22:38 ` Karel Zak
2007-07-19 11:17 ` Robert P. J. Day
2007-07-19 13:57 ` Christoph Hellwig
2007-07-19 15:27 ` Robert P. J. Day
2007-07-19 15:32 ` Jiri Slaby
2007-07-19 16:10 ` Robert P. J. Day
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.