iofunc_unlink()

Подтвердить, что запись может быть уничтожена

Прототип:

#include <sys/iofunc.h>
int iofunc_unlink( resmgr_context_t *ctp,
io_unlink_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_unlink_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_unlink() function verifies that the msg specifies valid semantics for an unlink, and that the client is allowed to unlink the resource, as specified by a combination of who the client is (info), and the resource attributes attr, dattr, attr->uid and attr->gid.

If a directory entry is being removed, iofunc_unlink() checks to see that the directory is empty. The iofunc_unlink() function also updates the time stamps, and decrements the link count for the entry.

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

EOK
Успешное завершение.
ENOTDIR
Attempt to unlink a nondirectory entry using directory semantics, (e.g. "rmdir file").
EINVAL
Attempt to remove the "." directory.
ENOTEMPTY
Attempt to remove a directory that isn't empty.
EROFS
Attempt to remove an entry on a read-only filesystem.
EACCES
The client doesn't have permissions to do the operation.
EPERM
The group ID or owner ID didn't match.

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

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

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

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

struct _client_info, io_unlink_t, struct _io_connect, struct _io_connect_link_reply, struct _io_connect_ftype_reply, ConnectClientInfo(), iofunc_attr_t, iofunc_check_access(), resmgr_context_t




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