Lines Matching refs:ea

3  *  linux/fs/hpfs/ea.c
20 struct extended_attribute *ea = (struct extended_attribute *)ex;
27 if (ea_indirect(ea)) {
28 if (ea_valuelen(ea) != 8) {
29 hpfs_error(s, "ea_indirect(ea) set while ea->valuelen!=8, %s %08x, pos %08x",
33 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4))
35 hpfs_ea_remove(s, ea_sec(ea), ea_in_anode(ea), ea_len(ea));
37 pos += ea->namelen + ea_valuelen(ea) + 5;
81 struct extended_attribute *ea;
83 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
84 if (!strcmp(ea->name, key)) {
85 if (ea_indirect(ea))
87 if (ea_valuelen(ea) >= size)
89 memcpy(buf, ea_data(ea), ea_valuelen(ea));
90 buf[ea_valuelen(ea)] = 0;
98 ea = (struct extended_attribute *)ex;
105 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4))
107 if (!strcmp(ea->name, key)) {
108 if (ea_indirect(ea))
110 if (ea_valuelen(ea) >= size)
112 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), buf))
114 buf[ea_valuelen(ea)] = 0;
117 pos += ea->namelen + ea_valuelen(ea) + 5;
121 if (ea_len(ea) >= size)
123 if (hpfs_ea_read(s, ea_sec(ea), ea_in_anode(ea), 0, ea_len(ea), buf))
125 buf[ea_len(ea)] = 0;
136 struct extended_attribute *ea;
138 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
139 if (!strcmp(ea->name, key)) {
140 if (ea_indirect(ea))
141 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea));
142 if (!(ret = kmalloc((*size = ea_valuelen(ea)) + 1, GFP_NOFS))) {
146 memcpy(ret, ea_data(ea), ea_valuelen(ea));
147 ret[ea_valuelen(ea)] = 0;
156 ea = (struct extended_attribute *)ex;
163 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4))
165 if (!strcmp(ea->name, key)) {
166 if (ea_indirect(ea))
167 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea));
168 if (!(ret = kmalloc((*size = ea_valuelen(ea)) + 1, GFP_NOFS))) {
172 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), ret)) {
176 ret[ea_valuelen(ea)] = 0;
179 pos += ea->namelen + ea_valuelen(ea) + 5;
186 * when this ea exists, it MUST have the same size as size of data.
199 struct extended_attribute *ea;
201 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
202 if (!strcmp(ea->name, key)) {
203 if (ea_indirect(ea)) {
204 if (ea_len(ea) == size)
205 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size);
206 } else if (ea_valuelen(ea) == size) {
207 memcpy(ea_data(ea), data, size);
217 ea = (struct extended_attribute *)ex;
224 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4))
226 if (!strcmp(ea->name, key)) {
227 if (ea_indirect(ea)) {
228 if (ea_len(ea) == size)
229 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size);
232 if (ea_valuelen(ea) == size)
233 hpfs_ea_write(s, a, ano, pos + 4 + ea->namelen + 1, size, data);
237 pos += ea->namelen + ea_valuelen(ea) + 5;
255 ea = fnode_end_ea(fnode);
256 *(char *)ea = 0;
257 ea->namelen = strlen(key);
258 ea->valuelen_lo = size;
259 ea->valuelen_hi = size >> 8;
260 strcpy(ea->name, key);
261 memcpy(ea_data(ea), data, size);
266 But what .. HPFS.IFS has also bugs in ea management. */
298 /* Aargh... don't know how to create ea anodes :-( */