stdio errno update

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

Moderators: cheriff, Herben

Post Reply
ragnarok2040
Posts: 202
Joined: Wed Aug 09, 2006 1:00 am

stdio errno update

Post by ragnarok2040 »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
ragnarok2040
Posts: 202
Joined: Wed Aug 09, 2006 1:00 am

Post by ragnarok2040 »

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: Select all

 blocks so I see your point. I'll just upload any further patches to my site and make an announcement here :D.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Code: Select all

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.
Post Reply