Subject: Re: My mails never show up ...
To: Stefan Sonnenberg-Carstens <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 03/21/2003 14:31:38
> ... sad but true.
> I've send my question four times now, [...]

> Please, help.

That, I can't help much with.  I'd have to check a bunch of things I
have no access to, most notably the logs on your incoming mailserver.

> I followed some docs and found that a device driver (can/should)
> support these operations:
> open,close,probe,attach,read,write,ioctl - complete ?

No; there are others as well.  mmap, stop, tty, poll - see <sys/conf.h>
(at least in the version I'm running - it's the "struct cdevsw"
definition, wherever it is, that you want to look at).

You don't necessarily need all of these in all circumstances.  I don't
think I've ever written a driver that has a nontrivial stop routine,
for example.

> What about the seek operation ?
> I didn't find it.
> Is this something that has to do with the uio->uio_offset stuff ?
> This was the only thing, that made sense to me.

Basically, yes: drivers don't handle seeking.  Seeks just change the
offset field for the file descriptor; the driver doesn't hear about it
until I/O is done, and then they get it through, yes, the uio_offset
field of the struct uio they're passed.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B