*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> extattr_namespace_to_string (3)              
Title
Content
Arch
Section
 

EXTATTR(3)

Contents


NAME    [Toc]    [Back]

     extattr_namespace_to_string, extattr_string_to_namespace -- convert an
     extended attribute namespace identifier to a string and vice versa

LIBRARY    [Toc]    [Back]

     System Utilities Library (libutil, -lutil)

SYNOPSIS    [Toc]    [Back]

     #include <sys/extattr.h>
     #include <libutil.h>

     int
     extattr_namespace_to_string(int attrnamespace, char **string);

     int
     extattr_string_to_namespace(const char *string, int *attrnamespace);

DESCRIPTION    [Toc]    [Back]

     The extattr_namespace_to_string() function converts a VFS extended
     attribute identifier to a human-readable string; the
     extattr_string_to_namespace() function undoes the aforementioned operation,
 and converts a human-readable string representing a namespace to a
     namespace identifier.  Although a file system may implement arbitrary
     namespaces, these functions only support the EXTATTR_NAMESPACE_USER
     (``user'') and EXTATTR_NAMESPACE_SYSTEM (``system'') namespaces, which
     are defined in extattr(9).

     These functions are meant to be used in error reporting and other interactive
 tasks.  For example, instead of printing the integer identifying
     an extended attribute in an error message, a program might use
     extattr_namespace_to_string() to obtain a human-readable representation.
     Likewise, instead of requiring a user to enter the integer representing a
     namespace, an interactive program might ask for a name and use
     extattr_string_to_namespace() to get the desired identifier.

RETURN VALUES    [Toc]    [Back]

     If any of the calls are unsuccessful, the value -1 is returned and the
     global variable errno is set to indicate the error.

ERRORS    [Toc]    [Back]

     [EINVAL]		The requested namespace could not be identified.

SEE ALSO    [Toc]    [Back]

      
      
     extattr(2), getextattr(8), setextattr(8), extattr(9)

HISTORY    [Toc]    [Back]

     Extended attribute support was developed as part of the TrustedBSD
     Project, and introduced in FreeBSD 5.0.  It was developed to support
     security extensions requiring additional labels to be associated with
     each file or directory.


FreeBSD 5.2.1			 June 24, 2001			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
if_indextoname OpenBSD convert interface index to name, and vice versa
if_nameindex OpenBSD convert interface index to name, and vice versa
if_freenameindex OpenBSD convert interface index to name, and vice versa
if_nametoindex OpenBSD convert interface index to name, and vice versa
unexpand HP-UX expand tabs to spaces, and vice versa
expand FreeBSD expand tabs to spaces, and vice versa
expand HP-UX expand tabs to spaces, and vice versa
expand OpenBSD expand tabs to spaces, and vice versa
unexpand FreeBSD expand tabs to spaces, and vice versa
unexpand OpenBSD expand tabs to spaces, and vice versa
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service