COHERENT manpages

This page displays the COHERENT manpage for uname() [Get the name and version of COHERENT].

List of available manpages
Index


uname() -- System Call (libc)

Get the name and version of COHERENT
#include <sys/utsname.h>
int uname(name)
struct utsname *name;

The  COHERENT system  call uname()  identifies the  current release  of the
COHERENT operating system.  It writes its output into the structure pointed
to by name. This must be of type utsname, which has the following members:

     char sysname[SYS_NMLN];  /* system name */
     char nodename[SYS_NMLN]; /* UUCP node name */
     char release[SYS_NMLN];  /* current release */
     char version[SYS_NMLN];  /* current version */
     char machine[SYS_NMLN];  /* hardware */

uname()  returns a  non-negative  value upon  success.   If something  went
wrong, i.e., name points to an invalid address, uname() returns -1 and sets
errno to an appropriate value.

See Also

libc,
utsname.h
POSIX Standard, §4.4.1

Notes

The COHERENT  implementation of uname()  conforms to POSIX  Standard, which
states  that uname()  returns a  ``non-negative''  value upon  success.  To
write  portable code,  your code  must  check for  a return  value that  is
greater than  or equal to zero.   It is an error to  check for return value
equal to  zero, because the test  works on some systems  that adhere to the
Standard but not on others.