Xref: utzoo comp.unix.wizards:6499 comp.unix.questions:5563 Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!pasteur!ucbvax!hplabs!cae780!tektronix!tekcrl!terryl From: terryl@tekcrl.TEK.COM Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: A Question Concerning Device Drivers Keywords: ? Message-ID: <2315@tekcrl.TEK.COM> Date: 15 Feb 88 18:15:30 GMT References: <2879@watale.waterloo.edu> <3823@megaron.arizona.edu> Reply-To: terryl@tekcrl.tek.com Distribution: na Organization: Tektronix, Inc., Beaverton, OR. Lines: 33 In article <3823@megaron.arizona.edu> lm@megaron.arizona.edu.UUCP (Larry McVoy) writes: >In article <2879@watale.waterloo.edu> watmelon@watale.waterloo.edu (Mech. Eng. Robotics Group) writes: >>In System V, is the cpass/passc combination the only way to pass data >>between a user's buffer and a character driver? >>It seems to be a bit of a waste of time to copy data one character at a time >>when you could probably do some kind of block copy. >>Are there other ways of passing the data? > >copyout(driverbuf,userbuf,n) >caddr_t driverbuf, userbuf; >unsigned n; > >copyin(userbuf,driverbuf,n) >.... > >The kernel will not know if the user didn't have enough buffer space. Tis true, but under BSD UNIX, there's a routine called useracc(useraddr, len, rw) that one can call to validate the address space the user wants to transfer into/out of(depending on the value of rw). Perhaps Sys V has something similar???? Boy Do I Hate Inews !!!! !!!!