Lines Matching refs:ea
20 struct extended_attribute *ea = (struct extended_attribute *)ex; in hpfs_ea_ext_remove() local
27 if (ea_indirect(ea)) { in hpfs_ea_ext_remove()
28 if (ea_valuelen(ea) != 8) { in hpfs_ea_ext_remove()
33 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove()
35 hpfs_ea_remove(s, ea_sec(ea), ea_in_anode(ea), ea_len(ea)); in hpfs_ea_ext_remove()
37 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove()
81 struct extended_attribute *ea; in hpfs_read_ea() local
83 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) in hpfs_read_ea()
84 if (!strcmp(ea->name, key)) { in hpfs_read_ea()
85 if (ea_indirect(ea)) in hpfs_read_ea()
87 if (ea_valuelen(ea) >= size) in hpfs_read_ea()
89 memcpy(buf, ea_data(ea), ea_valuelen(ea)); in hpfs_read_ea()
90 buf[ea_valuelen(ea)] = 0; in hpfs_read_ea()
98 ea = (struct extended_attribute *)ex; in hpfs_read_ea()
105 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_read_ea()
107 if (!strcmp(ea->name, key)) { in hpfs_read_ea()
108 if (ea_indirect(ea)) in hpfs_read_ea()
110 if (ea_valuelen(ea) >= size) in hpfs_read_ea()
112 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), buf)) in hpfs_read_ea()
114 buf[ea_valuelen(ea)] = 0; in hpfs_read_ea()
117 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_read_ea()
121 if (ea_len(ea) >= size) in hpfs_read_ea()
123 if (hpfs_ea_read(s, ea_sec(ea), ea_in_anode(ea), 0, ea_len(ea), buf)) in hpfs_read_ea()
125 buf[ea_len(ea)] = 0; in hpfs_read_ea()
136 struct extended_attribute *ea; in hpfs_get_ea() local
138 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) in hpfs_get_ea()
139 if (!strcmp(ea->name, key)) { in hpfs_get_ea()
140 if (ea_indirect(ea)) in hpfs_get_ea()
141 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea)); in hpfs_get_ea()
142 if (!(ret = kmalloc((*size = ea_valuelen(ea)) + 1, GFP_NOFS))) { in hpfs_get_ea()
146 memcpy(ret, ea_data(ea), ea_valuelen(ea)); in hpfs_get_ea()
147 ret[ea_valuelen(ea)] = 0; in hpfs_get_ea()
156 ea = (struct extended_attribute *)ex; in hpfs_get_ea()
163 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_get_ea()
165 if (!strcmp(ea->name, key)) { in hpfs_get_ea()
166 if (ea_indirect(ea)) in hpfs_get_ea()
167 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea)); in hpfs_get_ea()
168 if (!(ret = kmalloc((*size = ea_valuelen(ea)) + 1, GFP_NOFS))) { in hpfs_get_ea()
172 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), ret)) { in hpfs_get_ea()
176 ret[ea_valuelen(ea)] = 0; in hpfs_get_ea()
179 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_get_ea()
199 struct extended_attribute *ea; in hpfs_set_ea() local
201 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) in hpfs_set_ea()
202 if (!strcmp(ea->name, key)) { in hpfs_set_ea()
203 if (ea_indirect(ea)) { in hpfs_set_ea()
204 if (ea_len(ea) == size) in hpfs_set_ea()
205 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size); in hpfs_set_ea()
206 } else if (ea_valuelen(ea) == size) { in hpfs_set_ea()
207 memcpy(ea_data(ea), data, size); in hpfs_set_ea()
217 ea = (struct extended_attribute *)ex; in hpfs_set_ea()
224 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_set_ea()
226 if (!strcmp(ea->name, key)) { in hpfs_set_ea()
227 if (ea_indirect(ea)) { in hpfs_set_ea()
228 if (ea_len(ea) == size) in hpfs_set_ea()
229 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size); in hpfs_set_ea()
232 if (ea_valuelen(ea) == size) in hpfs_set_ea()
233 hpfs_ea_write(s, a, ano, pos + 4 + ea->namelen + 1, size, data); in hpfs_set_ea()
237 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_set_ea()
255 ea = fnode_end_ea(fnode); in hpfs_set_ea()
256 *(char *)ea = 0; in hpfs_set_ea()
257 ea->namelen = strlen(key); in hpfs_set_ea()
258 ea->valuelen_lo = size; in hpfs_set_ea()
259 ea->valuelen_hi = size >> 8; in hpfs_set_ea()
260 strcpy(ea->name, key); in hpfs_set_ea()
261 memcpy(ea_data(ea), data, size); in hpfs_set_ea()