iofunc_link()

Связать две директории

Прототип:

#include <sys/iofunc.h>
int iofunc_link( resmgr_context_t *ctp,
io_link_t *msg,
iofunc_attr_t *attr,
iofunc_attr_t *dattr,
struct _client_info *info );

Аргументы:

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_link_t structure that contains the message that the resource manager received.
attr
A pointer to the iofunc_attr_t structure that describes the characteristics of the resource.
dattr
NULL, or a pointer to the iofunc_attr_t structure that describes the characteristics of the parent directory.
info
NULL, or a pointer to a struct _client_info that contains information about the client.

Библиотека:

libc

Описание:

The iofunc_link() helper function links directory attr to dattr for context ctp. It's similar to the iofunc_open() function:

The iofunc_link() 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, and the optional dattr structure defines the attributes of the parent directory (i.e. if dattr isn't NULL, it implies that the resource identified by attr is being created within the directory specified by dattr).

You can pass the info argument as NULL, in which case iofunc_link() 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.

If you pass NULL in info, the function returns information about a client's connection in info, and an error constant.

Возвращаемое значение:

EOK
Успешное завершение.
EBADFSYS.
NULL was passed in attr and dattr.
EFAULT
A fault occurred when the kernel tried to access the info buffer.
EINVAL
The client process is no longer valid.
ENOSYS
NULL was passed in info.
EPERM
The group ID or owner ID didn't match.

Классификация:

ЗОСРВ «Нейтрино»

Точка остановки потока
Нет
Обработчик прерываний
Нет
Обработчик сигналов
Да
В потоке
Да

Тематические ссылки:

struct _client_info, io_link_t, ConnectClientInfo(), iofunc_attr_t, iofunc_client_info(), iofunc_open(), struct _msg_info, resmgr_context_t




Предыдущий раздел: Описание API системной библиотеки