Xref: utzoo comp.unix.internals:2389 comp.unix.sysv386:6177 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz.au (Boyd Roberts) Newsgroups: comp.unix.internals,comp.unix.sysv386 Subject: Re: SCO UNIX *double* device driver Message-ID: <2050@necisa.ho.necisa.oz.au> Date: 21 Mar 91 01:27:42 GMT Article-I.D.: necisa.2050 References: <905@zeusa.UUCP> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 19 In article <905@zeusa.UUCP> hendrik@zeusa.UUCP (Hendrik Vermooten) writes: > >I need to "channel" all I/O going to and from a device, through my own >handler routine (this routine itself uses hardware to do its job). > Trivial. Write your driver so it calls the other driver through the bdevsw. Make the appropriate devices in dev to reference your driver. Use these instead of the ones referencing the device you're overlaying. Problem solved. You may have to be a bit careful about handling wakeups to prevent the wrong thing from happening, but it's not too hard. Just think about it carefully. Your driver is just a pseudo-device that manipulates another driver. Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''