Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_readlink.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_readlink.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_readlink.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_readlink.html on line 8

iofunc_readlink()

Verify a client's ability to read a symbolic link

Synopsis:

#include <sys/iofunc.h>

int iofunc_readlink( resmgr_context_t *ctp,
                     io_readlink_t *msg,
                     iofunc_attr_t *attr,
                     struct _client_info *info );

Arguments:

ctp
A pointer to a resmgr_context_t structure that the resource-manager library uses to pass context information between functions.
msg
A pointer to the io_readlink_t structure that contains the message that the resource manager received; see below.
attr
A pointer to the iofunc_attr_t structure that describes the characteristics of the device that's associated with your resource manager.
info
A pointer to a _client_info structure that contains the information about a client connection. For information about this structure, see ConnectClientInfo().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The iofunc_readlink() helper function supports readlink() requests by verifying that the client can read a symbolic link. It's similar to iofunc_open().

The iofunc_readlink() function checks to see if the client (described by the optional info structure) has access to open the resource (name passed in the msg structure). The attr structure describes the resource's attributes.

The info argument can be passed as NULL, in which case iofunc_readlink() obtains the client information itself via a call to iofunc_client_info(). It is, of course, more efficient to get the client info once, rather than calling this function with NULL every time.

The iofunc_readlink() function handles the readlink verification for the POSIX layer.

io_readlink_t structure

The io_readlink_t structure holds the _IO_CONNECT message received by the resource manager:

typedef union {
    struct _io_connect                  connect;
    struct _io_connect_link_reply       link_reply;
    struct _io_connect_ftype_reply      ftype_reply;
} io_readlink_t;

This message structure is a union of an input message (coming to the resource manager), _io_connect, and two possible output or reply messages (going back to the client):

Returns:

EBADFSYS
NULL was passed in attr.
EOK
Successful completion.

Classification:

QNX Neutrino

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

See also:

_io_connect, _io_connect_link_reply, _io_connect_ftype_reply, iofunc_open(), readlink()

Writing a Resource Manager

Resource Managers chapter of Getting Started with QNX Neutrino


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_readlink.html on line 211

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/iofunc_readlink.html on line 211