Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

errno in VxWorks

858 views
Skip to first unread message

Nilesh

unread,
Aug 29, 2001, 10:21:30 PM8/29/01
to
Hello!
I am trying to do moniter existence of a file in a directory
specified by the application. when I do stat() on that file, stat
fails as exepected and returns errno as 0x388002. This seems strange
to me. The last 2 bytes of the errno should tell me that file does not
exist when not present in the file system. Does 0x8002 ( the last 2
bytes of the errno) mean something? I think I should get the last 2
bytes as 0x02 only.
Could somebody help me out with this please? Am I wrong in
interpreting the result?

Thanks,

Nilesh

DrDiags

unread,
Aug 29, 2001, 11:52:58 PM8/29/01
to
Nilesh,

Look into using the routine for creating the statTbl,
mkStatTbl is the name I think. It goes through all the headers
and creates a table of errno's from each main component's
error information. The upper word is the library and the lower
is the error code. HTH. (If you have Windows, use the online
help).

--
http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html (vxWorks FAQ home
page)

Steeve Gagne

unread,
Aug 31, 2001, 8:56:34 AM8/31/01
to
This error seems more like

S_dosFsLib_FILE_NOT_FOUND (M_dosFsLib | ERRNO_PX_FLAG | ENOENT)

--
Steeve Gagne
steeve...@videotron.ca


"Nilesh" <npis...@yahoo.com> wrote in message
news:b6061ec6.01082...@posting.google.com...

Mario Semo

unread,
Sep 3, 2001, 11:05:31 AM9/3/01
to
Hello,

just as a note: the errnovalue is nearly unuseable for this under vxWorks.
I had a lot of discussions about this with WindRiver TechSupp.
One of the problems is, that stat may set errno to a device driver specific
value, so, 2 different drivers may set stat to the same value, with
different meaning...
Sample mail:

Hello,

I have a scenario where a stat() calls tells me that a file exists and so i
try to open this file.
(note: the open of this file happend about 50 more times earlier without
problem).

and in this scenario the open fails and i printf the errno value.

and this value is 421
??
i cannot find this value in errno.h

vxWorks 5.4, Target=Pentium. FTP-FS, Host=WinNT 4.05

here is the code:

if( (fdX = open(lObjectFile, O_RDONLY,0)) == ERROR )
{
LCtTraceFun(printf( "unable to open %s - %d\n",lObjectFile,errno));

and the output is:
unable to open ..\lcoplcfs.bin - 421

=========

reply:

in this special case, 421 corresponds to:

421 Service not available, closing control connection.
This may be a reply to any command if the service knows it
must shut down.

The rest of the error codes are defined in RFC 959.

=========

The reason is: in the above testcase i use FTP-FileSystem. FTP FileSystem
"returns" 421 when the file cannot be opened. But other FileSystem drivers
"return" other values in errno in the same situation.
You cannot write a filesystem independent handling of the errno value...


--
regards, Mario Semo. http://www.kirchnersoft.com


Nilesh <npis...@yahoo.com> wrote in message
news:b6061ec6.01082...@posting.google.com...

0 new messages