4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
33 #include <sys/vnode.h>
37 #include <sys/nvpair.h>
39 /* Attribute names for nvlist's */
40 #define A_CRTIME "crtime"
41 #define A_HIDDEN "hidden"
42 #define A_SYSTEM "system"
43 #define A_READONLY "readonly"
44 #define A_ARCHIVE "archive"
45 #define A_NOUNLINK "nounlink"
46 #define A_IMMUTABLE "immutable"
47 #define A_APPENDONLY "appendonly"
48 #define A_NODUMP "nodump"
49 #define A_OPAQUE "opaque"
50 #define A_AV_QUARANTINED "av_quarantined"
51 #define A_AV_MODIFIED "av_modified"
53 #define A_AV_SCANSTAMP "av_scanstamp"
54 #define A_OWNERSID "ownersid"
55 #define A_GROUPSID "groupsid"
56 #define A_REPARSE_POINT "reparse"
57 #define A_GEN "generation"
58 #define A_OFFLINE "offline"
59 #define A_SPARSE "sparse"
61 /* Attribute option for utilities */
64 #define O_READONLY "R"
66 #define O_NOUNLINK "u"
67 #define O_IMMUTABLE "i"
68 #define O_APPENDONLY "a"
70 #define O_AV_QUARANTINED "q"
71 #define O_AV_MODIFIED "m"
72 #define O_REPARSE_POINT "r"
77 /* ownersid and groupsid are composed of two nvpairs */
78 #define SID_DOMAIN "domain"
106 #define VIEW_READONLY "SUNWattr_ro"
107 #define VIEW_READWRITE "SUNWattr_rw"
110 * These are the supported views into the virtual sysattr directory.
111 * Additional views should be added before XATTR_VIEW_LAST.
114 XATTR_VIEW_INVALID
= -1,
116 XATTR_VIEW_READWRITE
,
123 xattr_view_t x_xattr_view
;
124 data_type_t x_data_type
;
128 #define XATTR_MAXFIDSZ NFS_FHMAXDATA
132 char parent_fid
[XATTR_MAXFIDSZ
];
137 #define XATTR_FIDSZ (sizeof (xattr_fid_t) - sizeof (uint16_t))
139 int xattr_dir_vget(vfs_t
*, vnode_t
**, fid_t
*);
140 int xattr_sysattr_casechk(char *name
);
143 int attr_count(void);
144 const char *attr_to_name(f_attr_t
);
145 const char *attr_to_option(f_attr_t
);
146 f_attr_t
name_to_attr(const char *name
);
147 f_attr_t
option_to_attr(const char *option
);
148 xattr_view_t
attr_to_xattr_view(f_attr_t attr
);
149 data_type_t
attr_to_data_type(f_attr_t attr
);
155 #endif /* _SYS_ATTR_H */