xattr.c (95d465fd750897ab32462a6702fbfe1b122cbbc0) xattr.c (4d81715fc5dfa1680ad47d7edf3ac4a74c5bf104)
1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004
3 * Copyright (C) Christoph Hellwig, 2002
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 83 unchanged lines hidden (view full) ---

92 */
93static inline int is_os2_xattr(struct jfs_ea *ea)
94{
95 /*
96 * Check for "system."
97 */
98 if ((ea->namelen >= XATTR_SYSTEM_PREFIX_LEN) &&
99 !strncmp(ea->name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004
3 * Copyright (C) Christoph Hellwig, 2002
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 83 unchanged lines hidden (view full) ---

92 */
93static inline int is_os2_xattr(struct jfs_ea *ea)
94{
95 /*
96 * Check for "system."
97 */
98 if ((ea->namelen >= XATTR_SYSTEM_PREFIX_LEN) &&
99 !strncmp(ea->name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
100 return FALSE;
100 return false;
101 /*
102 * Check for "user."
103 */
104 if ((ea->namelen >= XATTR_USER_PREFIX_LEN) &&
105 !strncmp(ea->name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
101 /*
102 * Check for "user."
103 */
104 if ((ea->namelen >= XATTR_USER_PREFIX_LEN) &&
105 !strncmp(ea->name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
106 return FALSE;
106 return false;
107 /*
108 * Check for "security."
109 */
110 if ((ea->namelen >= XATTR_SECURITY_PREFIX_LEN) &&
111 !strncmp(ea->name, XATTR_SECURITY_PREFIX,
112 XATTR_SECURITY_PREFIX_LEN))
107 /*
108 * Check for "security."
109 */
110 if ((ea->namelen >= XATTR_SECURITY_PREFIX_LEN) &&
111 !strncmp(ea->name, XATTR_SECURITY_PREFIX,
112 XATTR_SECURITY_PREFIX_LEN))
113 return FALSE;
113 return false;
114 /*
115 * Check for "trusted."
116 */
117 if ((ea->namelen >= XATTR_TRUSTED_PREFIX_LEN) &&
118 !strncmp(ea->name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN))
114 /*
115 * Check for "trusted."
116 */
117 if ((ea->namelen >= XATTR_TRUSTED_PREFIX_LEN) &&
118 !strncmp(ea->name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN))
119 return FALSE;
119 return false;
120 /*
121 * Add any other valid namespace prefixes here
122 */
123
124 /*
125 * We assume it's OS/2's flat namespace
126 */
120 /*
121 * Add any other valid namespace prefixes here
122 */
123
124 /*
125 * We assume it's OS/2's flat namespace
126 */
127 return TRUE;
127 return true;
128}
129
130static inline int name_size(struct jfs_ea *ea)
131{
132 if (is_os2_xattr(ea))
133 return ea->namelen + XATTR_OS2_PREFIX_LEN;
134 else
135 return ea->namelen;

--- 1004 unchanged lines hidden ---
128}
129
130static inline int name_size(struct jfs_ea *ea)
131{
132 if (is_os2_xattr(ea))
133 return ea->namelen + XATTR_OS2_PREFIX_LEN;
134 else
135 return ea->namelen;

--- 1004 unchanged lines hidden ---