18 char ex[4 + 255 + 1 + 8];
21 hpfs_error(s,
"EAs don't end correctly, %s %08x, len %08x",
22 ano ?
"anode" :
"sectors", a, len);
26 if (ea_indirect(ea)) {
27 if (ea_valuelen(ea) != 8) {
28 hpfs_error(s,
"ea_indirect(ea) set while ea->valuelen!=8, %s %08x, pos %08x",
29 ano ?
"anode" :
"sectors", a, pos);
36 pos += ea->
namelen + ea_valuelen(ea) + 5;
40 struct buffer_head *bh;
54 printk(
"HPFS: out of memory for EA\n");
66 const char *
data,
int size)
79 char ex[4 + 255 + 1 + 8];
82 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
86 if (ea_valuelen(ea) >=
size)
88 memcpy(buf, ea_data(ea), ea_valuelen(ea));
89 buf[ea_valuelen(ea)] = 0;
94 ano = fnode_in_anode(fnode);
99 hpfs_error(s,
"EAs don't end correctly, %s %08x, len %08x",
100 ano ?
"anode" :
"sectors", a, len);
109 if (ea_valuelen(ea) >= size)
113 buf[ea_valuelen(ea)] = 0;
116 pos += ea->
namelen + ea_valuelen(ea) + 5;
120 if (ea_len(ea) >= size)
122 if (
hpfs_ea_read(s, ea_sec(ea), ea_in_anode(ea), 0, ea_len(ea), buf))
137 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
140 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea));
142 printk(
"HPFS: out of memory for EA\n");
145 memcpy(ret, ea_data(ea), ea_valuelen(ea));
146 ret[ea_valuelen(ea)] = 0;
151 ano = fnode_in_anode(fnode);
154 char ex[4 + 255 + 1 + 8];
157 hpfs_error(s,
"EAs don't end correctly, %s %08x, len %08x",
158 ano ?
"anode" :
"sectors", a, len);
166 return get_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), *size = ea_len(ea));
168 printk(
"HPFS: out of memory for EA\n");
175 ret[ea_valuelen(ea)] = 0;
178 pos += ea->
namelen + ea_valuelen(ea) + 5;
190 const char *
data,
int size)
200 for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
202 if (ea_indirect(ea)) {
203 if (ea_len(ea) ==
size)
204 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea),
data,
size);
205 }
else if (ea_valuelen(ea) ==
size) {
206 memcpy(ea_data(ea), data, size);
212 ano = fnode_in_anode(fnode);
215 char ex[4 + 255 + 1 + 8];
218 hpfs_error(s,
"EAs don't end correctly, %s %08x, len %08x",
219 ano ?
"anode" :
"sectors", a, len);
226 if (ea_indirect(ea)) {
227 if (ea_len(ea) == size)
228 set_indirect_ea(s, ea_in_anode(ea), ea_sec(ea), data, size);
231 if (ea_valuelen(ea) == size)
236 pos += ea->
namelen + ea_valuelen(ea) + 5;
247 hpfs_error(s,
"fnode %08lx: ea_offs == %03x, ea_size_s == %03x",
248 (
unsigned long)inode->
i_ino,
254 ea = fnode_end_ea(fnode);
260 memcpy(ea_data(ea), data, size);
268 struct buffer_head *bh;
285 if (pos >= 30000)
goto bail;
286 while (((pos + 511) >> 9) > len) {
293 }
else if (!fnode_in_anode(fnode)) {
319 for (i = 0; i < len; i++) {
320 struct buffer_head *bh1, *bh2;
338 len = (pos + 511) >> 9;
341 if (fnode_in_anode(fnode)) {
359 hpfs_i(inode)->i_ea_size += 5 +
strlen(key) +
size;