A Question Concerning Device Drivers

terryl at tekcrl.TEK.COM terryl at tekcrl.TEK.COM
Tue Feb 16 04:15:30 AEST 1988


In article <3823 at megaron.arizona.edu> lm at megaron.arizona.edu.UUCP (Larry McVoy) writes:
>In article <2879 at watale.waterloo.edu> watmelon at 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
!!!!
!!!!



More information about the Comp.unix.wizards mailing list