Tim,
If you have the kernel source, the files include/asm-generic/errno.h and
include/asm-generic/errno-base.h have a list of system errors. The file
might also be found installed on a Linux system in the following
locations if you have the developer packages installed (gcc, system
headers, etc), at least one a Slack box:
/usr/src/linux/include/asm-generic/errno.h
/usr/src/linux/include/asm-generic/errno-base.h
/usr/include/asm/errno.h
/usr/include/asm-generic/errno.h
However the highest error code I see is 131. If the error code is a
system error you might try running the error code through strerror().
err = some_func();
printf("error: %s\n", strerror(err));
There is more information in the errno(3) man page, however it does not
provide numeric values of the errors.
On a side note, C functions that read in data to populate a string often
return how much data was actually read. For example, read() will return
the number of bytes of data read from a file descriptor if successful or
if unsuccessful return -1 and set errno.
Are you sure the call is not simply returning the number of bytes saved
to the string?
--David Syzdek
http://lxr.linux.no/source/include/asm-generic/errno-base.h
http://lxr.linux.no/source/include/asm-generic/errno.h
http://www.linuxmanpages.com/man2/read.2.php
http://www.linuxmanpages.com/man3/errno.3.php
http://www.linuxmanpages.com/man3/strerror.3.php
Tim Johnson wrote:
> Hi:
>
> I'm using a programming language that executes a system call
> on Linux Red Hat 9.0
>
> A system call to "ls" returns exit code 0 (as I would expect)
>
> A "buffered" system call -
> which gathers results in a string, rather than printing to stdout
> - to "ls" returns an exit code 204 which to this 'ol "C" dog signals an
> error, however the results appear to be correct.
>
> So I'm curious as to whether 204 is a known linux system error code number or
> perhaps the language interpreter is "munging" the exit code.
>
> Any links to linux error code info would be appreciated.
> thanks
> tim
>
-- Grief can take care of itself, but to get the full value of a joy you must have somebody to divide it with. -- Mark Twain --------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.Received on Tue Apr 18 22:20:45 2006
This archive was generated by hypermail 2.1.8 : Tue Apr 18 2006 - 22:20:45 AKDT