qnx_prefix_setroot

change the default network pathname prefix

Synopsis:

#include <sys/prfx.h>
int qnx_prefix_setroot( char *str );

Description:

The qnx_prefix_setroot() function changes the default network prefix root of the calling process. This is inherited by all children created after it's changed. The new root must be of the form //number, where number is a logical node id.

This function may impact your ability to locate any new files. If the current directory isn't prefixed with a node number (the normal case) then the current directory may jump to a new filesystem or become invalid as a result of the changed prefix root.

Returns:

The qnx_prefix_setroot() function returns a zero on success. It returns (-1) if str exceeds _QNX_PREFIX_SIZE_MAX (as defined in limits.h).

See also:

qnx_prefix_getroot()

Examples:

#include <stdio.h>
#include <sys/prfx.h>

void main()
  {
    printf( "Prefix root is %s\n",
        qnx_prefix_getroot() );

    qnx_prefix_setroot("//99");

    printf( "Prefix root is %s\n",
        qnx_prefix_getroot() );
  }

Classification:

QNX

Systems:

QNX