HP 3000 Manuals

uname [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

uname 

Returns current system ID's.

Syntax 

     #include <sys/utsname.h>
     init uname(struct utsname *name);

Parameters 

name                  A pointer to a string of characters that will
                      return system identification.

Return Values 

>=0                   Successful completion.

-1                    Error and errno is set to indicate the error.

Description 

The uname() function stores information identifying the current operating
system in the utsname structure pointed to by the argument name.

The structure utsname is defined in the header <sys/utsname.h> and
contains at least the members shown below:

sysname    Name of this implementation of the operating system.

nodename   Name of this node within an implementation-specified
           communications network.

release    Current operation system release ID.

version    Current operation system version ID.

machine    Name of the hardware type on which the system is running.

Each of these data items is a null-terminated array of char.

The inclusion of the nodename member in this structure does not imply
that it is sufficient information for interfacing to communications
networks.

A sample output of this parameter displays as follow:

      sysname = MPE/iX
      nodename = STARS.ITG.HP
      release = A.41.00
      version = A.51.07
      machine = SERIES 955

Implementation Considerations 

The node name is retrieved from NMCONFIG.PUB.SYS and is not necessarily
sufficient information for interfacing to communications networks.  The
release ID is the manufacture release ID, known as the release vuf on
MPE/iX. The version ID stands for the version of the MPE/iX OS product.

Since the POSIX standard does not specify any error conditions that are
required to be detected for the uname() function, all the error
conditions are implementation defined.  Successful completion will have a
function return of zero.

Errors 

If an error occurs, errno is set to one of the following values:

EFAULT            CAUSE           A null or bad address was detected in attempting to
                                  use the structure pointed to by the name argument.
                  ACTION          Check to see if the pointer is initialized and/or the
                                  structure is defined correctly.

ESYSERR           CAUSE           An internal operating system error has occurred; an
                                  error not directly applicable to the POSIX.1
                                  functionality.
                  ACTION          Contact Hewlett-Packard for support.

See Also 

exec(), getuid(), POSIX.1 (Section 3.3.2).



MPE/iX 5.0 Documentation