VOP_SETEXTATTR(9) | Kernel Developer's Manual | VOP_SETEXTATTR(9) |
VOP_SETEXTATTR
—
set named extended attribute for a vnode
#include
<sys/param.h>
#include <sys/vnode.h>
#include <sys/extattr.h>
int
VOP_SETEXTATTR
(struct
vnode *vp, int
attrnamespace, const char
*name, struct uio
*uio, struct ucred
*cred, struct thread
*td);
This vnode call may be used to set specific named extended attribute for a file or directory.
Its arguments are:
The uio structure is used in a manner similar to the argument of the same name in VOP_WRITE(9). However, as extended attributes provide a strict "name=value" semantic, non-zero offsets will be rejected.
The uio pointer may be
NULL
to indicate that the specified extended
attribute should be deleted.
The cred pointer may be
NULL
to indicate that access control checks are not
to be performed, if possible. This cred setting might
be used to allow the kernel to authorize extended attribute changes that the
active process might not be permitted to make.
Extended attribute semantics may vary by file system implementing the call. More information on extended attributes may be found in extattr(9).
The vnode will be locked on entry and should remain locked on return.
If the extended attribute is successfully set, then zero is returned. Otherwise, an appropriate error code is returned.
EACCES
]ENXIO
]ENOMEM
]EFAULT
]EINVAL
]EOPNOTSUPP
]VOP_SETEXTATTR
().ENOSPC
]EROFS
]This manual page was written by Robert Watson.
December 23, 1999 | Debian |