up | Inhaltsverzeichniss | Kommentar

Manual page for fn_ctx_rename(3N)

fn_ctx_rename - rename the name of a binding

SYNOPSIS

cc [ flag ... ] file ... -lxfn [ library ... ]

#include <xfn/xfn.h>

int fn_ctx_rename(FN_ctx_t *ctx, const FN_composite_name_t *oldname,
          const FN_composite_name_t *newname, unsigned int exclusive,
          FN_status_t *status);

MT-LEVEL

Safe.

DESCRIPTION

The fn_ctx_rename() operation binds the reference currently bound to oldname relative to ctx, to the name newname, and unbinds oldname. newname is resolved relative to the target context (that named by all but the terminal atomic part of oldname ).

If exclusive is zero, the operation overwrites any old binding of newname. If exclusive is nonzero, the operation fails if newname is already bound.

RETURN VALUE

fn_ctx_rename() returns 1 if the operation is successful, 0 otherwise.

ERRORS

fn_ctx_rename() sets status as described FN_status_t.3n and xfn_status_codes.3n

APPLICATION USAGE

The only restriction that XFN places on newname is that it be resolved relative to the target context. XFN does not specify further restrictions on newname. For example, in some implementations, newname might be restricted to be a name in the same naming system as the terminal component of oldname. In another implementation, newname might be restricted to be an atomic name.

Normal resolution always follows links. In a fn_ctx_rename() operation, resolution of oldname continues to the target context; the terminal atomic name is not resolved. If the terminal atomic name is bound to a link, the link is not followed and the operation binds newname to the link and unbinds the terminal atomic name of oldname.

In naming systems that support attributes and store the attributes along with the names, the unbind of the terminal atomic name of oldname also removes its associated attributes. It is implementation dependent whether these attributes become associated with newname.

SEE ALSO

FN_composite_name_t.3n FN_ctx_t.3n FN_ref_t.3n FN_status_t.3n fn_ctx_bind.3n fn_ctx_unbind.3n xfn_status_codes.3n xfn.3n


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97