Purpose
Retrieves the value associated with an Oracle ACFS file tag name.
Syntax
sb8 acfsgettag(const oratext *path, const oratext *tagname, oratext *value, size_t size, ub4 flags);
Table 18-3 contains the options available with the acfsgettag
command.
Table 18-3 Options for the acfsgettag command
Option | Description |
---|---|
|
Specifies a pointer to a file or directory path name. |
|
Specifies a pointer to a NULL-terminated Oracle ACFS tag name in the format of a valid tag name for regular files and directories. |
|
Specifies the memory buffer to retrieve the Oracle ACFS tag value. |
|
Specifies the byte size of the memory buffer that holds the returned Oracle ACFS tag value. |
|
Reserved for future use. Must be set to 0. |
Description
The acfsgettag
library call retrieves the value string of the Oracle ACFS tag name. The return value is the nonzero byte length of the output value
string on success or ACFS_TAG_FAIL
on failure. For information about operating system-specific extended error information values that may be obtained when an ACFS_TAG_FAIL
is returned, refer to "Oracle ACFS Tagging Error Values".
Because Oracle ACFS tag names currently use a fixed value string of 0
(the number zero character with a byte length of one) the value is the same for all Oracle ACFS tag name entries. The size of the value
buffer can be determined by calling acfsgettag
with a NULL value
and 0
size
. The library call returns the byte size necessary to hold the value string of the tag name. acfsgettag
returns an ENODATA
error when the tag name is not set on the file.
Examples
Example 18-3 is an example of the use of the acfsgettag
function call.
Example 18-3 Retrieving a file tag value
sb8 rc; size_t size; oratext value[2]; const oratext *path = "/mnt/dir1/dir2/file2"; const oratext *tagname = "patch_set_11_1"; size = 1; (byte) memset((void *)value, 0, 2*sizeof(oratext)); rc = acfsgettag (path, tagname, value, size, 0); If (rc == ACFS_TAG_FAIL) /* check errno or GetLastError() to process error returns /*