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

  man pages->OpenBSD man pages -> fflagstostr (3)              
Title
Content
Arch
Section
 

STRTOFFLAGS(3)

Contents


NAME    [Toc]    [Back]

     fflagstostr, strtofflags - convert between  file  flag  bits
and their
     string names

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     char *
     fflagstostr(u_int32_t flags);

     int
     strtofflags(char   **stringp,   u_int32_t  *setp,  u_int32_t
*clrp);

DESCRIPTION    [Toc]    [Back]

     The fflagstostr() function returns a comma separated  string
of the file
     flags  represented  by  flags.   If  no flags are set a zero
length string is
     returned.

     If  memory  cannot  be  allocated  for  the  return   value,
fflagstostr() returns
     NULL.

     The  value  returned  from  fflagstostr()  is  obtained from
malloc() and
     should be returned to the system with free() when  the  program is done
     with it.

     The  strtofflags() function takes a string of file flags, as
described in
     chflags(1), parses it, and returns the ``set'' and ``clear''
flags such
     as  would  be given as arguments to chflags(2).  On success,
strtofflags()
     returns 0, otherwise it returns non-zero and stringp is left
pointing to
     the offending token.

ERRORS    [Toc]    [Back]

     The fflagstostr() function may fail and set errno for any of
the errors
     specified for the library routine malloc(3).

SEE ALSO    [Toc]    [Back]

      
      
     chflags(1), chflags(2), malloc(3)

HISTORY    [Toc]    [Back]

     The fflagstostr() and strtofflags() functions first appeared
in OpenBSD
     2.8.

OpenBSD      3.6                          January     1,     2000
[ Back ]
 Similar pages
Name OS Title
convertfs HP-UX convert an HFS file system to allow long file names
convertfs_hfs HP-UX convert an HFS file system to allow long file names
addr2line Linux convert addresses into file names and line numbers.
addr2line FreeBSD convert addresses into file names and line numbers.
addr2line NetBSD convert addresses into file names and line numbers
tk_name IRIX convert between names and window tokens
wcsnrtombs Linux convert a wide character string to a multibyte string
mbsnrtowcs Linux convert a multibyte string to a wide character string
wcsrtombs Linux convert a wide character string to a multibyte string
mbstowcs Linux convert a multibyte string to a wide character string
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service