Hey guys,
I'm trying to port a linux library to a embedded environment. Now the code was running fine untill i encountered this problem.
Now if i try to just open c:/ which has another dvd then the file malloc goes properly and i proceed to read the DVD files properly. But when i change the parameter to cliffHanger (or anything else for that matter) the malloc fails.Code:main(){ dvd = DVDOpen("c:/CliffHanger"); } dvd_reader_t *DVDOpen( const char *ppath ) { /*Lots of init stuff here*/ ret_val = DVDOpenPath( path ); } static dvd_reader_t *DVDOpenPath( const char *path_root ) { dvd_reader_t *dvd; dvd = (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) ); if( !dvd ) return 0; /* lots of other stuff here*/ }
This is wierd becuase i dont think there is any connectiong between the malloc and what I give as the parameter...
Another intresting observation is that the malloc on fail gives a errno of 0.. so if i try stderror(errno) it prints sayin no error. Can some one unravel this mystery before i lose my temper and break the board..
Thanks guys for your patience.
P.S: The filesystem i'm running is a Fat32 on the hard disk on the embedded board. Just a info. Dont think its related though.