[Previous]
[Contents]
[Next]

qnx_strtonid()

convert a string to a node ID

Synopsis:

#include <sys/vc.h>
nid_t qnx_strtonid( const char *nodename,
                    char **str );

Description:

The qnx_strtonid() function converts a string representing a node ID into an object of type nid_t. Typically, this function is used by programs that take a node ID as a command line parameter (for example, -n node).

The conversion ends at the first unrecognized character. A pointer to that character is stored in the character pointer to which str points, if str isn't NULL.

Returns:

A valid numeric node ID on success. Even though a valid number is returned, the status of that node is not known (that is, whether it is "up" or "down"). On error, -1 is returned and errno is set.

Errors:

EINVAL
The node string is invalid.

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, qnx_nidtostr()


[Previous]
[Contents]
[Next]