Demangle an #ifdef mess and make all ioctl routines take an u_long
as the command argument. Before we were subject to subtle sign extension differences depending on char being signed or unsigned.
This commit is contained in:
parent
c6e66cb834
commit
83930a016c
@ -27,7 +27,7 @@
|
||||
* i4b_ctl.c - i4b system control port driver
|
||||
* ------------------------------------------
|
||||
*
|
||||
* $Id: i4b_ctl.c,v 1.2 2001/03/24 12:40:31 martin Exp $
|
||||
* $Id: i4b_ctl.c,v 1.3 2001/04/21 07:23:41 martin Exp $
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
@ -150,11 +150,7 @@ static void *devfs_token;
|
||||
void i4bctlattach __P((void));
|
||||
int i4bctlopen __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
int i4bctlclose __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
#ifdef __bsdi__
|
||||
int i4bctlioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
|
||||
#else
|
||||
int i4bctlioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
|
||||
#endif
|
||||
#endif /* !FreeBSD */
|
||||
|
||||
#if BSD > 199306 && defined(__FreeBSD__)
|
||||
@ -264,13 +260,7 @@ i4bctlclose(dev_t dev, int flag, int fmt, struct proc *p)
|
||||
* i4bctlioctl - device driver ioctl routine
|
||||
*---------------------------------------------------------------------------*/
|
||||
PDEVSTATIC int
|
||||
#if defined (__FreeBSD_version) && __FreeBSD_version >= 300003
|
||||
i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#elif defined(__bsdi__)
|
||||
i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#else
|
||||
i4bctlioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
#endif
|
||||
{
|
||||
#if DO_I4B_DEBUG
|
||||
ctl_debug_t *cdbg;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4b_i4bdrv.c - i4b userland interface driver
|
||||
* --------------------------------------------
|
||||
*
|
||||
* $Id: i4b_i4bdrv.c,v 1.3 2001/03/24 12:40:31 martin Exp $
|
||||
* $Id: i4b_i4bdrv.c,v 1.4 2001/04/21 07:23:41 martin Exp $
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
@ -136,12 +136,7 @@ PDEVSTATIC void i4battach __P((void));
|
||||
PDEVSTATIC int i4bopen __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
PDEVSTATIC int i4bclose __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
PDEVSTATIC int i4bread __P((dev_t dev, struct uio *uio, int ioflag));
|
||||
|
||||
#ifdef __bsdi__
|
||||
PDEVSTATIC int i4bioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
|
||||
#else
|
||||
PDEVSTATIC int i4bioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
|
||||
#endif
|
||||
|
||||
#ifdef OS_USES_POLL
|
||||
PDEVSTATIC int i4bpoll __P((dev_t dev, int events, struct proc *p));
|
||||
@ -359,13 +354,7 @@ i4bread(dev_t dev, struct uio *uio, int ioflag)
|
||||
* i4bioctl - device driver ioctl routine
|
||||
*---------------------------------------------------------------------------*/
|
||||
PDEVSTATIC int
|
||||
#if defined (__FreeBSD_version) && __FreeBSD_version >= 300003
|
||||
i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#elif defined(__bsdi__)
|
||||
i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#else
|
||||
i4bioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
#endif
|
||||
{
|
||||
call_desc_t *cd;
|
||||
int error = 0;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4b_tel.c - device driver for ISDN telephony
|
||||
* --------------------------------------------
|
||||
*
|
||||
* $Id: i4b_tel.c,v 1.3 2001/03/24 12:40:33 martin Exp $
|
||||
* $Id: i4b_tel.c,v 1.4 2001/04/21 07:23:41 martin Exp $
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
@ -170,12 +170,7 @@ static u_char sinetab[];
|
||||
#ifndef __FreeBSD__
|
||||
#define PDEVSTATIC /* - not static - */
|
||||
PDEVSTATIC void i4btelattach __P((void));
|
||||
|
||||
#ifdef __bsdi__
|
||||
PDEVSTATIC int i4btelioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
|
||||
#else
|
||||
PDEVSTATIC int i4btelioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
|
||||
#endif
|
||||
|
||||
int i4btelopen __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
int i4btelclose __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
@ -430,13 +425,7 @@ i4btelclose(dev_t dev, int flag, int fmt, struct proc *p)
|
||||
* i4btelioctl - device driver ioctl routine
|
||||
*---------------------------------------------------------------------------*/
|
||||
PDEVSTATIC int
|
||||
#if defined(__FreeBSD_version) && __FreeBSD_version >= 300003
|
||||
i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#elif defined(__bsdi__)
|
||||
i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#else
|
||||
i4btelioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
#endif
|
||||
{
|
||||
int unit = UNIT(dev);
|
||||
int func = FUNC(dev);
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4btrc - device driver for trace data read device
|
||||
* ---------------------------------------------------
|
||||
*
|
||||
* $Id: i4b_trace.c,v 1.4 2001/03/24 12:40:33 martin Exp $
|
||||
* $Id: i4b_trace.c,v 1.5 2001/04/21 07:23:41 martin Exp $
|
||||
*
|
||||
* last edit-date: [Fri Jan 5 11:33:47 2001]
|
||||
*
|
||||
@ -82,7 +82,7 @@ void i4btrcattach __P((void));
|
||||
int i4btrcopen __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
int i4btrcclose __P((dev_t dev, int flag, int fmt, struct proc *p));
|
||||
int i4btrcread __P((dev_t dev, struct uio * uio, int ioflag));
|
||||
int i4btrcioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
|
||||
int i4btrcioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
* interface attach routine
|
||||
@ -357,13 +357,7 @@ i4btrcpoll(dev_t dev, int events, struct proc *p)
|
||||
* device driver ioctl routine
|
||||
*---------------------------------------------------------------------------*/
|
||||
PDEVSTATIC int
|
||||
#if defined (__FreeBSD_version) && __FreeBSD_version >= 300003
|
||||
i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#elif defined(__bsdi__)
|
||||
i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
#else
|
||||
i4btrcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
#endif
|
||||
{
|
||||
int error = 0;
|
||||
int bri = minor(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user