Page 1 of 1
simple dir list
Posted: Sun Jun 12, 2005 7:48 pm
by radad
Hi I have got a simple dir list working with the fio* functions but when I try the same with the fileXio* functions it hangs on the first fileXio* call.
Is it true that the fio* functions are part of the ps2sdk kernel and therefore do not need an irx? Whereas the fileXio* need the fileXio.irx?
I am running this through ps2link which loads fileXio.irx so I don't need to load it in my elf, right?
Thanks.
Posted: Sun Jun 12, 2005 7:55 pm
by pixel
fileXio.irx isn't loaded by ps2link, thus needs to be loaded by you. Otherwise, all your other assumptions are 'basically' right.
Posted: Sun Jun 12, 2005 8:36 pm
by radad
Thanks for the quick response. I loaded fileXio.irx and it now attempts to do the dir listing. The mode and size values work correctly but the name entry is always empty. Btw this is using the fileXioDread function.
Posted: Sun Jun 12, 2005 9:07 pm
by radad
And when I use the fileXioGetdir function, the name is again empty but the properties are also all zero. The filesize seems to be correct though.
Any ideas as to what I am doing wrong?
Posted: Mon Jun 13, 2005 11:25 pm
by radad
I tried my dir program using mc0:/ as the path and it lists correctly (using the fio* functions) but when I try it with cdrom0:/ as the path I get this output (none of which is in my code):
dopen name cdrom0:/
nulldev calldopen fd = 2
nulldev callnulldev call
the fioDread returns 0 on the first call indicating the directory is empty. The cd is a PS1 cd, does that matter? I don't have a PS2 cd.