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 

stdio errno update

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



Joined: 09 Aug 2006
Posts: 230

PostPosted: Mon Nov 17, 2008 8:24 am    Post subject: stdio errno update Reply with quote

I modified the majority of the stdio functions to set errno if an error occurs. I also added an implementation of rename() but it only works with fileXioRename and I didn't flesh it out that much. I created a stub for fioRename() that just returns -ENOSYS for _ps2sdk_rename*. I also changed fseek() to return a proper value again.

I was thinking there should be a note somewhere that explains that a fileXio function or fileXioInit() be used prior to any stdio functions being called if a user wishes to avoid using the fileio equivalent functions by accident but I'm not sure where it would be appropriate to put it.

Edit:
I uploaded the patch to http://homebrew.thewaffleiron.net/ragnarok2040 and it's called ps2sdk-errno.patch.tar.gz.


Last edited by ragnarok2040 on Tue Nov 18, 2008 3:34 am; edited 1 time in total
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Nov 17, 2008 11:27 am    Post subject: Reply with quote

Patch files should never be quoted or in a code block if you mean for people to use them. Between the board and whatever text program the patch is cut and pasted into, the whitespace and/or line ending will be totally hosed, causing the patch file to fail. Always zip (or some other archiver) them and post the link from a static site or long-lasting download service (which means no RapidShare). Archiving the patch file is not about making it smaller (although that is a plus), it's about having a way to identify that the patch file is not corrupted during download.
Back to top
View user's profile Send private message AIM Address
ragnarok2040



Joined: 09 Aug 2006
Posts: 230

PostPosted: Tue Nov 18, 2008 4:09 am    Post subject: Reply with quote

I made a tarball of it and uploaded it to my site. My host disallows hotlinking so I thought it'd be easier to just upload the text of the patch here considering other patches seemed to get merged in similarly. I had noticed that tabs seemed to be changed to a number of spaces in text that was in [code] blocks so I see your point. I'll just upload any further patches to my site and make an announcement here :D.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Nov 18, 2008 4:36 am    Post subject: Reply with quote

Code:
Sending        ee/libc/src/stdio.c
Sending        ee/rpc/filexio/src/fileXio_rpc.c
Transmitting file data ..
Committed revision 1473.

Added to the repository, thanks again.
Back to top
View user's profile Send private message Visit poster's website
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