home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / attr / xattr.h < prev   
Encoding:
C/C++ Source or Header  |  2008-04-01  |  2.2 KB  |  62 lines

  1. /*
  2.  * Copyright (c) 2001-2002 Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This program is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Lesser General Public License
  7.  * as published by the Free Software Foundation.
  8.  *
  9.  * This program is distributed in the hope that it would be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU Lesser General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Lesser General Public License
  15.  * along with this program; if not, write the Free Software Foundation,
  16.  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  17.  */
  18. #ifndef __XATTR_H__
  19. #define __XATTR_H__
  20.  
  21. #include <features.h>
  22.  
  23. #include <errno.h>
  24. #ifndef ENOATTR
  25. # define ENOATTR ENODATA        /* No such attribute */
  26. #endif
  27.  
  28. #define XATTR_CREATE  0x1       /* set value, fail if attr already exists */
  29. #define XATTR_REPLACE 0x2       /* set value, fail if attr does not exist */
  30.  
  31.  
  32. __BEGIN_DECLS
  33.  
  34. extern int setxattr (const char *__path, const char *__name,
  35.               const void *__value, size_t __size, int __flags) __THROW;
  36. extern int lsetxattr (const char *__path, const char *__name,
  37.               const void *__value, size_t __size, int __flags) __THROW;
  38. extern int fsetxattr (int __filedes, const char *__name,
  39.               const void *__value, size_t __size, int __flags) __THROW;
  40.  
  41. extern ssize_t getxattr (const char *__path, const char *__name,
  42.                 void *__value, size_t __size) __THROW;
  43. extern ssize_t lgetxattr (const char *__path, const char *__name,
  44.                 void *__value, size_t __size) __THROW;
  45. extern ssize_t fgetxattr (int __filedes, const char *__name,
  46.                 void *__value, size_t __size) __THROW;
  47.  
  48. extern ssize_t listxattr (const char *__path, char *__list,
  49.                 size_t __size) __THROW;
  50. extern ssize_t llistxattr (const char *__path, char *__list,
  51.                 size_t __size) __THROW;
  52. extern ssize_t flistxattr (int __filedes, char *__list,
  53.                 size_t __size) __THROW;
  54.  
  55. extern int removexattr (const char *__path, const char *__name) __THROW;
  56. extern int lremovexattr (const char *__path, const char *__name) __THROW;
  57. extern int fremovexattr (int __filedes,   const char *__name) __THROW;
  58.  
  59. __END_DECLS
  60.  
  61. #endif    /* __XATTR_H__ */
  62.