Re: Portable binary drivers

Christer Weinigel (wingel@cendio.se)
Tue, 7 Dec 1999 18:13:27 +0100


> > Which breaks horribly since /usr/include/net conflicts with
> > /usr/src/linux-2.4.15ac10/include/net on a RedHat 6.1 box :-(
>
> You are never supposed to use user mode header files in the kernel, so the
> problem doesnt arise. Ditto in the reverse

So how should the header files for an ioctl interface to a driver be
handled then? It seems like a waste of energy to have two keep one
file for userspace use and one for kernel use, especially since the
two have to be kept in sync.

For example, setserial.c has the following includes:

#include <stdio.h>
#include <fcntl.h>
#include <termios.h>
#include <string.h>
#include <errno.h>
...
#include <asm/ioctls.h>
#include <linux/serial.h>

I know it's not entirely kosher, but the alternative seems worse to me.

/Christer

-- 
Christer Weinigel		Cendio Systems AB
Email:	wingel@cendio.se	Teknikringen 8
Phone:	+46-13-21 46 00		583 30  Linköping
Fax:	+46-13-21 47 00		Sweden
[please note that Signum Support has changed its name to Cendio Systems]

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