forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

fileXioOpen() issue

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
methos3



Joined: 01 Feb 2008
Posts: 89

PostPosted: Wed Aug 26, 2009 1:04 am    Post subject: fileXioOpen() issue Reply with quote

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

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...)
Back to top
View user's profile Send private message
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Wed Aug 26, 2009 2:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
methos3



Joined: 01 Feb 2008
Posts: 89

PostPosted: Wed Aug 26, 2009 9:21 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group