[Previous] [Contents] [Next]

resmgr_pathname()

Return the pathname associated with an ID

Synopsis:

#include <sys/resmgr.h>

int resmgr_pathname( int id,
                     unsigned flags, 
                     char* path, 
                     int maxbuf );

Library:

libc

Description:

The resmgr_pathname() function returns the pathname associated with an id that's returned from resmgr_attach(), it's also the ctp->id value of all the resmgr callout functions.

By default, a globally unique pathname is returned, if flags is _RESMGR_PATHNAME_LOCALPATH then a shortened pathname only usable on the local machine is returned.

If the id was obtained from calling resmgr_attach() with _RESMGR_FLAG_DIR specified, then a trailing slash is returned from this function.

This function calls netmgr_ndtostr(ND2S_DIR_SHOW, nd, buf, sizeofbuf) by default, but when _RESMGR_PATHNAME_LOCALPATH is specified it calls netmgr_ndtostr(ND2S_DIR_SHOW|ND2S_LOCAL_STR, nd, buf, sizeofbuf) to return a shortened path that's usable on your local node only. This is useful for display.

Returns:

Errors:

EFAULT
A fault occurred in a server's address space when it tried to access the caller's message buffers.
ESRCH
The thread indicated by ctp -> rcvid doesn't exist or its connection is detached.
ESRVRFAULT
A fault occurred when the kernel tried to access the buffers provided.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

resmgr_attach()


[Previous] [Contents] [Next]