Home > Veritas Storage Foundation™ File System Manual Pages
VXFS_NATTR_OPEN (3) |
Library Functions |
-l vxfsutil -ldl
cc -I /opt/VRTS/include -L /opt/VRTS/lib/sparcv9
-l vxfsutil -ldl
#include <sys/types.h>
#include <vxfsutil.h>
int vxfs_nattr_open(int fd, char *path, int *oflag, /* mode_t mode */);
If the path is set to "." (dot), the returned file descriptor points to the named data stream directory.
Values for oflag are constructed by a bit-wise inclusive or of flags from the following list (defined in <fcntl.h>). Applications must specify one of the following three file access modes for oflag:
- O_RDONLY
- Open for reading only.
- O_WRONLY
- Open for writing only.
- O_RDWR
- Open for reading and writing.
Any combination of the following can be used:
- O_APPEND
- If specified, the file offset is set to the end of the file before each write operation.
- O_CREAT
- Creates the named data stream. If the file already exists, O_CREAT has no effect except as described under O_EXCL below.
- O_EXCL
- If O_CREAT and O_EXCL are set, vxfs_nattr_open() fails if the file exists. If O_CREAT is not set, the effect is undefined.
- O_DSYNC
- Write I/O operations on the file descriptor complete as defined by synchronized I/O data integrity guarantees.
- O_RSYNC
- Read I/O operations on the file descriptor complete at the same level of data integrity specified by the O_DSYNC and O_SYNC flags.
If either O_DSYNC or O_SYNC and O_RSYNC are set in oflags, all I/O operations on the file descriptor complete as defined by synchronized I/O data integrity guarantees.
Some flag values can be set following vxfs_nattr_open() similar to that of the fcntl function.
- O_SYNC
- If O_SYNC is set on a named data stream, write operations to that file cause the process to block until the data is written to the underlying hardware.
- O_TRUNC
- If the file exists and is successfully opened with O_RDWR or O_WRONLY, the file length is truncated to zero. The result of using O_TRUNC with O_RDONLY is undefined.
- O_LARGEFILE
- If O_LARGEFILE is specified, the named data stream is created with support for large files.
Opening a named data stream with a prefix of $vxfs: fails with the EINVAL error. The $vxfs: prefix is reserved by Symantec.
Last updated: 1 Jun 2006
Copyright ©2009 Symantec Corporation
All rights reserved.