fileXioOpen() issue

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

Moderators: cheriff, Herben

Post Reply
methos3
Posts: 89
Joined: Fri Feb 01, 2008 3:21 am

fileXioOpen() issue

Post by methos3 »

Hello again!
It could sound like an idiot question, but...
ON this part of my code (i've written just to test something)

Code: Select all

dump_path = getPath(&cnf1);
strcat(dump_path, "/just_testing.txt");
fileXioInit();
fd = fileXioOpen(dump_path, O_WRONLY|O_CREAT|O_TRUNC, 0666);
fileXioClose(fd);
getPath returns a pointer to a path selected by the user, and for testing I select: "mass:/boot", and after strcat it becomes "mass:/boot/just_testing.txt"
on fileXioOpen, instead of opening the file, the PS2 just freezes...
I've loaded all of the required modules, but nothing : (

Thanks for any help!

[edit]
Oh, I forgot to load fileXio.irx, I thought iomanX had a rpc server in it, but it doesn't. But... now anyone could answer me this:
I load XSIO2MAN, XPADMAN, XMCMAN, usbd.irx, usbdhfsd.irx, iomanx.irx, and then mcdump.irx (from the HDProject), and when I call the function that requires a path, I pass the "dump_path" () returned by getPath(), and... the PS2 freezes (probably when trying to create the file, I've modified the mcdump irx so that I could test when it freezes)... By the way, the path that I must pass to iomanX' functions (open(), etc...) must be diferent from those to the ioman? (I mean, things like '/' or '\', etc...)
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

I'm not sure if this is the problem, but the path doesn't require '\' or '/' at root level. Examples: mass:program.elf, mass:folder/program.elf.
methos3
Posts: 89
Joined: Fri Feb 01, 2008 3:21 am

Post by methos3 »

Mmm.. No, I don't think it is the problem, otherwise I wouldn't browse the files using fioDOpen too (and mc0: and mc1: does require the '/')...I've fixed something, now it just returns an error instead of hanging, but I still don't know why it's not opening.

[edit]
weird... right before calling the irx' function open(), I use fileXioOpen() with the same args as open() inside the irx, and fileXioOpen succesfully opens the file, and open() inside the irx returns a negative value... The only thing that I do before calling the irx is resetting the IOP and reloading the iomanx, xsio2man, xmcman, usbd and usbhdfsd modules. even more strange is that on the emulator, when I select a dir on the memory card as destination, it works!! :/


[edit]
I've made a better explained and updated thread, so... GM's, please delete or block this one, ok?
Post Reply