vxfs_nattr_link - link to a named data stream
cc -I /opt/VRTS/include -L /opt/VRTS/lib-l vxfsutil -ldl
int vxfs_nattr_link(int sfd, char *spath, char *tpath);
The vxfs_nattr_link() function creates a new directory entry for an existing named data stream and increments its link count by one. The spath argument points to the existing named data stream in the named data stream namespace for sfd. tpath points to the new directory entry created in the named data stream name space for sfd.Linking a named data stream with a prefix of $vxfs: fails with the EINVAL error. The $vxfs: prefix is reserved by Symantec.
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.
strings do not correspond to the current directory and parent directory,
as they do in POSIX UNIX standards.
This allows users to create files with these names.
users should use appropriate names for named data streams that
will not be confusing when read from the POSIX UNIX name space perspective.
vxfs_nattr_link() returns zero on success, -1 on failure. If unsuccessful, no link is created and errno is set to indicate the error.
EACCES The specified spath does not exist. The user does not have permission to open or write to the named data stream directory.
EDQUOT The directory for the new link cannot be created because the user quota of disk blocks on that file system was exceeded. EEXIST The link named by tpath already exists. EINVAL The file system disk layout version does not support named data streams. EINVAL Linking a named data stream with a prefix of $vxfs:. The $vxfs: prefix is reserved by Symantec. ENOSPC There is insufficient space to create a directory for the link.
vxfs_nattr_open(3), vxfs_nattr_rename(3), vxfs_nattr_unlink(3), vxfs_nattr_utimes(3)
|VxFS 5.1 SP1||vxfs_nattr_link (3)|