vxfs_nattr_unlink - remove a named data stream
cc -I /opt/VRTS/include -L /opt/VRTS/lib-l vxfsutil -ldl
int vxfs_nattr_unlink(int fd, char *path);
The vxfs_nattr_unlink() function removes the directory entry for the named data stream pointed to by path associated with fd and decrements the link count of the associated named data stream by one.
When the named data stream link count becomes zero and no process has the file open, the space occupied by the file is freed and the data stream is no longer accessible.
To remove the attribute file, write permission is required on the original file.
The behavior of "" (null string) for named data stream interfaces is same as "." (dot). If a user specifies "" as the path name of a file, the string is treated as "." and the named data stream directory file descriptor is returned.
Upon successful completion, vxfs_nattr_unlink() returns zero. Otherwise, -1 is returned, errno is set to indicate the error, and the file is not unlinked.
EACCES Search permission does not exist for a component of the path prefix. There is no write permission on the directory containing the link to be removed. The parent directory has the sticky bit set and the file is not writable by the user. The user does not own the parent directory or the file. EFAULT The path argument points to an illegal address. EINTR An interrupt signal was sent during function execution. ENAMETOOLONG The length of the path argument exceeds PATH_MAX. A path name component is longer than NAME_MAX while _POSIX_NO_TRUNC is in effect. ENOENT The named file does not exist or is a null path name. ENOLINK The path argument points to a remote system and the link to that system is not active. ENOTDIR A component of the path prefix is not a directory. EPERM The named file is a directory and the calling process does not have the privileges needed to perform the operation. EROFS The directory entry to be unlinked is part of a read-only file system.
vxfs_nattr_link(3), vxfs_nattr_open(3), vxfs_nattr_rename(3) vxfs_nattr_utimes(3)
|VxFS 5.1 SP1||vxfs_nattr_unlink (3)|