stdio.c - device types

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

stdio.c - device types

Post 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.
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

any comments ?

thanks beforehands.
Herben
Posts: 107
Joined: Sun Jan 25, 2004 10:25 am

Post by Herben »

I doubt you'll find anyone who objects to this. And if they do, just send them to tubgirl.com ;)
Post Reply