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 

Misc problems in header files EE and IOP

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



Joined: 27 May 2004
Posts: 23
Location: Austin, TX

PostPosted: Fri May 28, 2004 9:38 pm    Post subject: Misc problems in header files EE and IOP Reply with quote

Folks;

Any good reason for O_RDONLY being 1 in PS2LIB-2.1 and 0 in newlib(1.11.0)? This causes some confusion for us poor filoe system driver writers.

And another thing, the prototype on the IOP side for lseek (api and driver call) is wrong. The offset is typed as an unsigned long. (huh, how do negative offsets work then... no mind) However, the IOP passes an int along from an api invocation through to an underlying driver. Messes up the register/stack calling sequence and oftentimes, whence (which appears to be checked by some low level IOMAN IOP code) becomes illegal, the driver version of lseek is then never called and an error is returned (which many applications dutifully ignore...)
Back to top
View user's profile Send private message Visit poster's website
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Fri May 28, 2004 10:51 pm    Post subject: Reply with quote

Blame SCE for O_RDONLY, they use 1 where POSIX is 0.

Any reason you're using ps2lib for IOP development vs. ps2drv? ps2drv's iop/include/iomanX.h has the correct prototype for lseek(). And the only whence check I know of (in the ROM IOMAN) does bounds checking on whence before passing off lseek to the low-level driver.
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