Home > Veritas Storage Foundation™ File System Manual Pages

VXFS_NATTR_UNLINK (3)

Library Functions

Table of contents


NAME

vxfs_nattr_unlink - remove a named data stream

SYNOPSIS

cc -I /opt/VRTS/include -L /opt/VRTS/lib
-l vxfsutil -ldl

#include <sys/types.h>

#include <vxfsutil.h>

int vxfs_nattr_unlink(int fd, char *path);


DESCRIPTION

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.


RETURN VALUES

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.

ERRORS

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.

SEE ALSO

vxfs_nattr_link(3), vxfs_nattr_open(3), vxfs_nattr_rename(3) vxfs_nattr_utimes(3)

Last updated: 01 April 2006
Copyright ©2009 Symantec Corporation
All rights reserved.