18 char * old = de->
name;
22 for (i = 0; i < len; i++) {
23 unsigned char c = old[
i];
27 if (c >=
'A' && c <=
'Z')
31 if (c ==
'.' && i == len - 3 && old[i + 1] ==
';' && old[i + 2] ==
'1')
35 if (c ==
';' && i == len - 2 && old[i + 1] ==
'1')
40 if (c ==
';' || c ==
'/')
61 if ((*((
unsigned char *) de) - std) != 32)
63 chr = ((
unsigned char *) de) +
std;
64 if (
strncmp(chr,
"ARCHIMEDES", 10))
66 if ((*retname ==
'_') && ((chr[19] & 1) == 1))
68 if (((de->
flags[0] & 2) == 0) && (chr[13] == 0xff)
69 && ((chr[12] & 0xf0) == 0xf0)) {
70 retname[retnamlen] =
',';
71 sprintf(retname+retnamlen+1,
"%3.3x",
72 ((chr[12] & 0xf) << 8) | chr[11]);
81 static int do_isofs_readdir(
struct inode *
inode,
struct file *filp,
87 unsigned long block,
offset, block_saved, offset_saved;
88 unsigned long inode_number = 0;
89 struct buffer_head *bh =
NULL;
97 offset = filp->
f_pos & (bufsize - 1);
98 block = filp->
f_pos >> bufbits;
111 de_len = *(
unsigned char *) de;
123 block = filp->
f_pos >> bufbits;
133 if (offset >= bufsize) {
134 int slop = bufsize - offset + de_len;
136 offset &= bufsize - 1;
144 memcpy((
void *) tmpde + slop, bh->b_data, offset);
152 " in block %lu of inode %lu\n", block,
158 isofs_normalize_block_and_offset(de,
161 inode_number = isofs_get_ino(block_saved,
162 offset_saved, bufbits);
167 filp->
f_pos += de_len;
176 filp->
f_pos += de_len;
185 if (filldir(dirent,
"..", 2, filp->
f_pos, inode_number,
DT_DIR) < 0)
187 filp->
f_pos += de_len;
201 filp->
f_pos += de_len;
233 if (filldir(dirent, p, len, filp->
f_pos, inode_number,
DT_UNKNOWN) < 0)
236 filp->
f_pos += de_len;
250 static int isofs_readdir(
struct file *filp,
256 struct inode *inode = filp->
f_path.dentry->d_inode;
264 result = do_isofs_readdir(inode, filp, dirent, filldir, tmpname, tmpde);
274 .readdir = isofs_readdir,