This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AW: POSIX FileIO


Hi Daniel ;-)

... 
> I've tried to create a file: 
> ... open("test.dat",O_CREAT | O_WRONLY );... 
>  
> the output: 
> ================= 
> ASSERT FAIL: <2>fd.cxx[209]<nofunc>() fd out of range 
> ASSERT FAIL: <2>[209]<nofunc>() fd out of range 
> ================= 
>  
> in /ecos/packages/io/fileio/current/src/file.cxx 
> function: open 
> line 6458:   
> ... 
> fd=cyg_fd_alloc(0); 
> ... 
>  
> is the "0" right? 
> because in /ecos/packages/io/fileio/current/src/fd.cxx: 
> function: cyg_fd_alloc 
> line 6424: 
> ... 
> CYG_ASSERT(((0 < low) && (low<CYGNUM_FILEIO_NDF)),"fd out of range"); 
> ... 
>  
> or is this assert wrong? and should be 0<=low ?? 

This check has been committed on 29th march, so it's still quite new. So I guess either the call to cyg_fd_alloc() has to be changed to use 1 as min fd instead of 0, or the assert should be changed. The same problem should also appear in socket.cxx...

Alex

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]