Page 1 of 1

stdio.c - device types

Posted: Wed Aug 23, 2006 4:44 am
by evilo
I was reviewing the stdio. code and noticed that newer device types are not specified (usb_mass, hdd). So __stdio_get_fd_type() always returns -1 if used.

What about adding these devices ? this would allow to access any device using the standard functions (fopen, fread, ...) and without having to care about the device itself. So each function in stdio.c could check __iob.type and use (for example) fioOpen or fileXioOpen depending of the device type.

the only problem is that it adds a dependency with fileXio, but is it really a problem ?

of course it's not really needed with usb_mass (as default case is fine for it), but it could be nice for the hdd.

thank you for your feedback :)

evilo.

Posted: Tue Aug 29, 2006 6:34 pm
by evilo
any comments ?

thanks beforehands.

Posted: Wed Nov 22, 2006 4:08 pm
by Herben
I doubt you'll find anyone who objects to this. And if they do, just send them to tubgirl.com ;)