AW: AW: [En-Nut-Discussion] Get file size vom VIRTUALDEVICE(was:Register overwriting in interrupted code)

Oliver Schulz olischulz at web.de
Sun Jul 25 15:52:36 CEST 2004


Hi Harald,

>
> I see. Right, with such a function it's up to the driver,
> how it manages its buffer bookkeeping. But then we should
> stick to ioctl() instead of creating additional functions.
>
> [...]
>
> Using global ioctl commands will simplify applications
> and allow to write more general I/O routines, which
> work with different types of devices.
>
I would now also like to use the ioctl from each driver.
But there is one problem, that we have to discuss about. In device.h the
ioctl function for the struct NUTDEVICE takes as first parameter a pointer
to NUTDEVICE. If we want ioctl to perform file dependent functions, such as
'getfilesize' the first parameter to ioctl needs to be changed to NUTFILE*.

I think there is no big problem to change the affected code, because the
NUTFILE structure has a pointer to the connected device (nf_dev).

If you are ok with that, I can start to modify the whole code.
Any further suggestions?

Cheers,
Oliver.




More information about the En-Nut-Discussion mailing list