Please enter search query.
Search <book_title>...
Veritas™ File System Programmer's Reference Guide - Solaris
Last Published:
2018-08-24
Product(s):
InfoScale & Storage Foundation (7.2)
Platform: Solaris
- Veritas File System software developer's kit
- File Change Log
- About the File Change Log file
- Record types
- File Change Log tunables
- Application programming interface for File Change Log
- API functions
- File Change Log record
- Copying File Change Log records
- Veritas File System and File Change Log upgrade and downgrade
- Reverse path name lookup
- Multi-volume support
- Named data streams
- Veritas File System I/O
- Caching advisories
- Extents
- Thin Reclamation
Application programming interface
The named data streams API uses a combination of standard system calls and VxFS API calls to utilize its functionality.
The following is an example of pseudo code to query named data streams:
/* Create and open a file */ if ((fd = open("named_stream_file", O_RDWR | O_CREAT | O_TRUNC, mode)) < 0) { sprintf(error_buf, "%s, Error Opening File %s ", argv[0], filename); perror(error_buf); exit(-1); } /* Write to the regular file as usual */ write(fd, buf, 1024); /* Create several named data streams for file named_stream_file */ for (i = 0; i < 20; i++) { sprintf(attrname, "%s%d", "stream", i); nfd = vxfs_nattr_open(fd, attrname, O_WRONLY | O_CREAT, mode); if (nfd < 0) { sprintf(error_buf, "%s, Error Opening Attribute file %s/./%s ", argv[0], filename, attrname); perror(error_buf); exit(-1); } /* Write some data to the stream file */ memset(buf, 0x41 + i, 1024); write(nfd, buf, 1024); close(nfd); }