diff options
author | hm <hm@FreeBSD.org> | 1999-03-07 16:08:20 +0000 |
---|---|---|
committer | hm <hm@FreeBSD.org> | 1999-03-07 16:08:20 +0000 |
commit | 7e46cf5dd7cad6e069e50c85ee9a31ca260848fb (patch) | |
tree | 03a43e3e3e7f8598823a4548c687c6e4558751c8 /sys/i4b/driver/i4b_ctl.c | |
parent | e2549f2539bc2e4543d92ba29f33e4313595b4d4 (diff) | |
download | FreeBSD-src-7e46cf5dd7cad6e069e50c85ee9a31ca260848fb.zip FreeBSD-src-7e46cf5dd7cad6e069e50c85ee9a31ca260848fb.tar.gz |
update the i4b kernel part to i4b release 0.71.00
Diffstat (limited to 'sys/i4b/driver/i4b_ctl.c')
-rw-r--r-- | sys/i4b/driver/i4b_ctl.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c index 04c63c1..680217e 100644 --- a/sys/i4b/driver/i4b_ctl.c +++ b/sys/i4b/driver/i4b_ctl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,9 +27,9 @@ * i4b_ctl.c - i4b system control port driver * ------------------------------------------ * - * $Id: i4b_ctl.c,v 1.1 1998/12/27 21:46:42 phk Exp $ + * $Id: i4b_ctl.c,v 1.19 1999/02/14 19:51:01 hm Exp $ * - * last edit-date: [Sat Dec 5 17:59:15 1998] + * last edit-date: [Sun Feb 14 10:02:29 1999] * *---------------------------------------------------------------------------*/ @@ -70,6 +70,9 @@ #ifdef __FreeBSD__ #include <machine/i4b_debug.h> #include <machine/i4b_ioctl.h> +#elif defined(__bsdi__) +#include <i4b/i4b_debug.h> +#include <i4b/i4b_ioctl.h> #else #include <machine/bus.h> #include <sys/device.h> @@ -116,7 +119,11 @@ 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__) @@ -137,6 +144,34 @@ SYSINIT(i4bctldev, SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR, &i4bctlinit, NULL) #endif /* BSD > 199306 && defined(__FreeBSD__) */ +#ifdef __bsdi__ +int i4bctlmatch(struct device *parent, struct cfdata *cf, void *aux); +void dummy_i4bctlattach(struct device*, struct device *, void *); + +#define CDEV_MAJOR 64 + +static struct cfdriver i4bctlcd = + { NULL, "i4bctl", i4bctlmatch, dummy_i4bctlattach, DV_DULL, + sizeof(struct cfdriver) }; +struct devsw i4bctlsw = + { &i4bctlcd, + i4bctlopen, i4bctlclose, noread, nowrite, + i4bctlioctl, seltrue, nommap, nostrat, + nodump, nopsize, 0, nostop +}; + +int +i4bctlmatch(struct device *parent, struct cfdata *cf, void *aux) +{ + printf("i4bctlmatch: aux=0x%x\n", aux); + return 1; +} +void +dummy_i4bctlattach(struct device *parent, struct device *self, void *aux) +{ + printf("dummy_i4bctlattach: aux=0x%x\n", aux); +} +#endif /* __bsdi__ */ /*---------------------------------------------------------------------------* * interface attach routine *---------------------------------------------------------------------------*/ @@ -190,6 +225,8 @@ i4bctlclose(dev_t dev, int flag, int fmt, struct proc *p) 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 |