public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Warn userspace about including an empty linux/tty.h.
@ 2007-07-19 11:23 Robert P. J. Day
  2007-07-19 22:20 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2007-07-19 11:23 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, jirislaby


Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  what subsystem would something like this belong to?


diff --git a/include/linux/tty.h b/include/linux/tty.h
index 691a174..fd67da8 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -5,6 +5,10 @@
  * 'tty.h' defines some structures used by tty_io.c and some defines.
  */

+#ifndef __KERNEL__
+#warning "Please don't include this file from userspace, it's empty."
+#endif
+
 #ifdef __KERNEL__
 #include <linux/fs.h>
 #include <linux/major.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] 3+ messages in thread

* Re: [PATCH] Warn userspace about including an empty linux/tty.h.
  2007-07-19 11:23 [PATCH] Warn userspace about including an empty linux/tty.h Robert P. J. Day
@ 2007-07-19 22:20 ` Andrew Morton
  2007-07-19 22:56   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2007-07-19 22:20 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, jirislaby

On Thu, 19 Jul 2007 07:23:46 -0400 (EDT)
"Robert P. J. Day" <rpjday@mindspring.com> wrote:

> 
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> 
> ---
> 
>   what subsystem would something like this belong to?
> 
> 
> diff --git a/include/linux/tty.h b/include/linux/tty.h
> index 691a174..fd67da8 100644
> --- a/include/linux/tty.h
> +++ b/include/linux/tty.h
> @@ -5,6 +5,10 @@
>   * 'tty.h' defines some structures used by tty_io.c and some defines.
>   */
> 
> +#ifndef __KERNEL__
> +#warning "Please don't include this file from userspace, it's empty."
> +#endif
> +

this seems pointless?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Warn userspace about including an empty linux/tty.h.
  2007-07-19 22:20 ` Andrew Morton
@ 2007-07-19 22:56   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-07-19 22:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List, jirislaby

On Thu, 19 Jul 2007, Andrew Morton wrote:

> On Thu, 19 Jul 2007 07:23:46 -0400 (EDT)
> "Robert P. J. Day" <rpjday@mindspring.com> wrote:
>
> >
> > Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> >
> > ---
> >
> >   what subsystem would something like this belong to?
> >
> >
> > diff --git a/include/linux/tty.h b/include/linux/tty.h
> > index 691a174..fd67da8 100644
> > --- a/include/linux/tty.h
> > +++ b/include/linux/tty.h
> > @@ -5,6 +5,10 @@
> >   * 'tty.h' defines some structures used by tty_io.c and some defines.
> >   */
> >
> > +#ifndef __KERNEL__
> > +#warning "Please don't include this file from userspace, it's empty."
> > +#endif
> > +
>
> this seems pointless?

it was one of the suggestions that was made.  the other was just to
stop exporting tty.h to userspace entirely, but that might break
something in userspace.  i really had no strong opinion either 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] 3+ messages in thread

end of thread, other threads:[~2007-07-19 22:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 11:23 [PATCH] Warn userspace about including an empty linux/tty.h Robert P. J. Day
2007-07-19 22:20 ` Andrew Morton
2007-07-19 22:56   ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox