Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netisdn Demangle an #ifdef mess and make all ioctl routi...
details: https://anonhg.NetBSD.org/src/rev/7a7a6ac5d8f7
branches: trunk
changeset: 508848:7a7a6ac5d8f7
user: martin <martin%NetBSD.org@localhost>
date: Sat Apr 21 07:23:41 2001 +0000
description:
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.
diffstat:
sys/netisdn/i4b_ctl.c | 12 +-----------
sys/netisdn/i4b_i4bdrv.c | 13 +------------
sys/netisdn/i4b_tel.c | 13 +------------
sys/netisdn/i4b_trace.c | 10 ++--------
4 files changed, 5 insertions(+), 43 deletions(-)
diffs (151 lines):
diff -r f3f7f6cc3fae -r 7a7a6ac5d8f7 sys/netisdn/i4b_ctl.c
--- a/sys/netisdn/i4b_ctl.c Sat Apr 21 05:54:02 2001 +0000
+++ b/sys/netisdn/i4b_ctl.c Sat Apr 21 07:23:41 2001 +0000
@@ -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 @@
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 @@
* 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;
diff -r f3f7f6cc3fae -r 7a7a6ac5d8f7 sys/netisdn/i4b_i4bdrv.c
--- a/sys/netisdn/i4b_i4bdrv.c Sat Apr 21 05:54:02 2001 +0000
+++ b/sys/netisdn/i4b_i4bdrv.c Sat Apr 21 07:23:41 2001 +0000
@@ -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 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 @@
* 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;
diff -r f3f7f6cc3fae -r 7a7a6ac5d8f7 sys/netisdn/i4b_tel.c
--- a/sys/netisdn/i4b_tel.c Sat Apr 21 05:54:02 2001 +0000
+++ b/sys/netisdn/i4b_tel.c Sat Apr 21 07:23:41 2001 +0000
@@ -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 @@
#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 @@
* 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);
diff -r f3f7f6cc3fae -r 7a7a6ac5d8f7 sys/netisdn/i4b_trace.c
--- a/sys/netisdn/i4b_trace.c Sat Apr 21 05:54:02 2001 +0000
+++ b/sys/netisdn/i4b_trace.c Sat Apr 21 07:23:41 2001 +0000
@@ -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 @@
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 @@
* 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);
Home |
Main Index |
Thread Index |
Old Index