xref: /titanic_50/usr/src/man/man3c/attropen.3c (revision 89b43686db1fe9681d80a7cf5662730cb9378cae)
te
Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
attropen 3C "1 Aug 2001" "SunOS 5.11" "Standard C Library Functions"
NAME
attropen - open a file
SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int attropen(const char *path, const char *attrpath, int oflag,
 /* mode_t mode */...);
DESCRIPTION

The attropen() function is similar to the open(2) function except that it takes a second path argument, attrpath, that identifies an extended attribute file associated with the first path argument. This function returns a file descriptor for the extended attribute rather than the file named by the initial argument.

The O_XATTR flag is set by default for attropen() and the attrpath argument is always interpreted as a reference to an extended attribute. Extended attributes must be referenced with a relative path; providing an absolute path results in a normal file reference.

RETURN VALUES

Refer to open(2).

ERRORS

Refer to open(2).

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityEvolving
MT-LevelSafe
SEE ALSO

open(2), attributes(5), fsattr(5)