Lines Matching refs:ea

19 		struct extended_attribute *ea = (struct extended_attribute *)ex;  in hpfs_ea_ext_remove()  local
26 if (ea_indirect(ea)) { in hpfs_ea_ext_remove()
27 if (ea_valuelen(ea) != 8) { in hpfs_ea_ext_remove()
32 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove()
34 hpfs_ea_remove(s, ea_sec(ea), ea_in_anode(ea), ea_len(ea)); in hpfs_ea_ext_remove()
36 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove()
80 struct extended_attribute *ea; in hpfs_read_ea() local
82 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) in hpfs_read_ea()
83 if (!strcmp(ea->name, key)) { in hpfs_read_ea()
84 if (ea_indirect(ea)) in hpfs_read_ea()
86 if (ea_valuelen(ea) >= size) in hpfs_read_ea()
88 memcpy(buf, ea_data(ea), ea_valuelen(ea)); in hpfs_read_ea()
89 buf[ea_valuelen(ea)] = 0; in hpfs_read_ea()
97 ea = (struct extended_attribute *)ex; in hpfs_read_ea()
104 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_read_ea()
106 if (!strcmp(ea->name, key)) { in hpfs_read_ea()
107 if (ea_indirect(ea)) in hpfs_read_ea()
109 if (ea_valuelen(ea) >= size) in hpfs_read_ea()
111 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), buf)) in hpfs_read_ea()
113 buf[ea_valuelen(ea)] = 0; in hpfs_read_ea()
116 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_read_ea()
120 if (ea_len(ea) >= size) in hpfs_read_ea()
122 if (hpfs_ea_read(s, ea_sec(ea), ea_in_anode(ea), 0, ea_len(ea), buf)) in hpfs_read_ea()
124 buf[ea_len(ea)] = 0; in hpfs_read_ea()
135 struct extended_attribute *ea; in hpfs_get_ea() local
137 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) in hpfs_get_ea()
138 if (!strcmp(ea->name, key)) { in hpfs_get_ea()
139 if (ea_indirect(ea)) in hpfs_get_ea()
140 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea)); in hpfs_get_ea()
141 if (!(ret = kmalloc((*size = ea_valuelen(ea)) + 1, GFP_NOFS))) { in hpfs_get_ea()
145 memcpy(ret, ea_data(ea), ea_valuelen(ea)); in hpfs_get_ea()
146 ret[ea_valuelen(ea)] = 0; in hpfs_get_ea()
155 ea = (struct extended_attribute *)ex; in hpfs_get_ea()
162 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_get_ea()
164 if (!strcmp(ea->name, key)) { in hpfs_get_ea()
165 if (ea_indirect(ea)) in hpfs_get_ea()
166 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea)); in hpfs_get_ea()
167 if (!(ret = kmalloc((*size = ea_valuelen(ea)) + 1, GFP_NOFS))) { in hpfs_get_ea()
171 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), ret)) { in hpfs_get_ea()
175 ret[ea_valuelen(ea)] = 0; in hpfs_get_ea()
178 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_get_ea()
198 struct extended_attribute *ea; in hpfs_set_ea() local
200 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) in hpfs_set_ea()
201 if (!strcmp(ea->name, key)) { in hpfs_set_ea()
202 if (ea_indirect(ea)) { in hpfs_set_ea()
203 if (ea_len(ea) == size) in hpfs_set_ea()
204 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size); in hpfs_set_ea()
205 } else if (ea_valuelen(ea) == size) { in hpfs_set_ea()
206 memcpy(ea_data(ea), data, size); in hpfs_set_ea()
216 ea = (struct extended_attribute *)ex; in hpfs_set_ea()
223 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_set_ea()
225 if (!strcmp(ea->name, key)) { in hpfs_set_ea()
226 if (ea_indirect(ea)) { in hpfs_set_ea()
227 if (ea_len(ea) == size) in hpfs_set_ea()
228 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size); in hpfs_set_ea()
231 if (ea_valuelen(ea) == size) in hpfs_set_ea()
232 hpfs_ea_write(s, a, ano, pos + 4 + ea->namelen + 1, size, data); in hpfs_set_ea()
236 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_set_ea()
254 ea = fnode_end_ea(fnode); in hpfs_set_ea()
255 *(char *)ea = 0; in hpfs_set_ea()
256 ea->namelen = strlen(key); in hpfs_set_ea()
257 ea->valuelen_lo = size; in hpfs_set_ea()
258 ea->valuelen_hi = size >> 8; in hpfs_set_ea()
259 strcpy(ea->name, key); in hpfs_set_ea()
260 memcpy(ea_data(ea), data, size); in hpfs_set_ea()