Re: [PATCH] ethtool.h should use userspace-accessible types

Matt Mackall
2004-03-14T03:25:09Z

On Fri, Mar 12, 2004 at 01:48:54PM -0800, Jonathan Lundell wrote:
> At 10:06 AM -0700 3/12/04, Eric W. Biederman wrote:
> >My intent was to say: Why change the types when there is no #ifdef
> >__KERNEL__ in the header. With no #ifdef __KERNEL__ it exports
> >definitions that are private to the kernel making it not safe for
> >userspace to use. With kernel private definitions in there it will
> >generate name space pollution if included by user space.
>
> Presumably because it *is* included by userspace, because it defines
> the interface between the kernel and userspace; of course userspace
> will (does) include it.

Well that's a bug. You don't include kernel headers in userspace.
Doing so has been deprecated for 8 years and 3 major releases.

--
Matt Mackall : http://www.selenic.com : Linux development and consulting