Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
XFN Interface Library Functionsfn_attr_modify(3XFN)


NAME

 fn_attr_modify - modify specified attribute associated with name

SYNOPSIS

 
cc [ flag ... ] file ... -lxfn [ library ... ]
#include <xfn/xfn.h>
int fn_attr_modify(FN_ctx_t *ctx, const FN_composite_name_t *name, unsigned int mod_op, const FN_attribute_t *attr, unsigned int follow_link, FN_status_t *status);

DESCRIPTION

 

This operation modifies according to mod_op the attribute attr associated with the object named name relative to ctx. If name is empty, the attribute associated with ctx is modified.

The value of follow_link determines what happens when the terminal atomic part of name is bound to an XFN link. If follow_link is non-zero, such a link is followed, and the values of the attribute associated with the final named object are returned; if follow_link is zero, such a link is not followed. Any XFN links encountered before the terminal atomic name are always followed.

The modification is made on the attribute identified by the attribute identifier of attr. The syntax and values of attr are used according to the modification operation.

The modification operations are as follows:

FN_ATTR_OP_ADD
Add an attribute with given attribute identifier and set of values. If an attribute with this identifier already exists, replace the set of values with those in the given set. The set of values may be empty if the target naming system permits.
FN_ATTR_OP_ADD_EXCLUSIVE
Add an attribute with the given attribute identifier and set of values. The operation fails if an attribute with this identifier already exists. The set of values may be empty if the target naming system permits.
FN_ATTR_OP_REMOVE
Remove the attribute with the given attribute identifier and all of its values. The operation succeeds even if the attribute does not exist. The values of the attribute supplied with this operation are ignored.
FN_ATTR_OP_ADD_VALUES
Add the given values to those of the given attribute (resulting in the attribute having the union of its prior value set with the set given). Create the attribute if it does not exist already. The set of values may be empty if the target naming system permits.
FN_ATTR_OP_REMOVE_VALUES
Remove the given values from those of the given attribute (resulting in the attribute having the set difference of its prior value set and the set given). This succeeds even if some of the given values are not in the set of values that the attribute has. In naming systems that require an attribute to have at least one value, removing the last value will remove the attribute as well.

RETURN VALUES

 
1
Successful operation.
0
Operation failed.

ERRORS

 

fn_attr_modify() sets status as described in FN_status_t(3XFN) and xfn_status_codes(3XFN).

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

FN_attribute_t(3XFN), FN_composite_name_t(3XFN), FN_ctx_t(3XFN), FN_status_t(3XFN), fn_attr_multi_modify(3XFN), xfn(3XFN), xfn_attributes(3XFN), xfn_status_codes(3XFN), attributes(5)

NOTES

 

The implementation of XFN in this Solaris release is based on the X/Open preliminary specification. It is likely that there will be minor changes to these interfaces to reflect changes in the final version of this specification. The next minor release of Solaris will offer binary compatibility for applications developed using the current interfaces. As the interfaces evolve toward standardization, it is possible that future releases of Solaris will require minor source code changes to applications that have been developed against the preliminary specification.


SunOS 5.9Go To TopLast Changed 13 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.