fp_getea Kernel Service

Purpose

Reads the value of an extended attribute value.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
int fp_getea (fp,name, value, size, countp, segflag)
struct file * fp;           
const char * name;
void * value;
size_t size;
ssize_t * countp;
int segflag;

Parameters

Item Description
fp Specifies the file structure returned by the fp_open kernel service.
name Specifies the name of the extended attribute. An extended attribute name is a NULL-terminated string.
value Specifies the pointer to a buffer in which the attribute is stored. The value of an extended attribute is an opaque byte stream of specified length.
size Specifies the size of the value buffer. If size is 0, fp_getea returns the current size of the named extended attribute, which can be used to estimate whether the size of a buffer is sufficiently large to hold the value associated with the extended attribute.
countp Specifies the actual size of the content in the value buffer.
segflag

Specifies the flag indicating where the pointer specified by the path parameter is located:

SYS_ADSPACE
The pointers specified by the name and value parameters are stored in kernel memory.
USER_ADSPACE
The pointers specified by the name and value parameters are stored in application memory.

Description

The fp_getea kernel service provides a common service used by:

  • The file system for the implementation of the fgetea subroutine.
  • Kernel routines outside the file system that set extended attribute values.

Execution Environment

The fp_getea kernel service can be called from the process environment only.

Return Values

Item Description
0 Indicates a successful operation.
ERRNO Indicates a failed operation. Returns an error number from the /usr/include/sys/errno.h file on failure.