29 if (filp->
f_pos >> 32)
36 switch ((
unsigned long)filp->
f_pos) {
38 if (filldir(dirent,
".", 1, 0, inode->
i_ino,
DT_DIR) < 0)
43 if (filldir(dirent,
"..", 2, 1,
dir.parent_id,
DT_DIR) < 0)
56 while (ops->
getnext(&dir, &obj) == 0) {
57 if (filldir(dirent, obj.name, obj.name_len,
77 #ifdef CONFIG_ADFS_FS_RW
94 ret = ops->
update(&dir, obj);
117 for (i = 0; i < name->len; i++) {
123 if (c1 >=
'A' && c1 <=
'Z')
125 if (c2 >=
'A' && c2 <=
'Z')
135 adfs_dir_lookup_byname(
struct inode *inode,
struct qstr *name,
struct object_info *obj)
147 adfs_error(sb,
"parent directory changed under me! (%lx but got %lx)\n",
158 if (name->len == 2 && name->
name[0] ==
'.' && name->
name[1] ==
'.') {
171 ret = ops->
setpos(&dir, 0);
176 while (ops->
getnext(&dir, obj) == 0) {
177 if (adfs_match(name, obj)) {
195 .readdir = adfs_readdir,
200 adfs_hash(
const struct dentry *parent,
const struct inode *inode,
203 const unsigned int name_len = ADFS_SB(parent->
d_sb)->s_namelen;
204 const unsigned char *
name;
208 if (qstr->len < name_len)
222 if (c >=
'A' && c <=
'Z')
225 hash = partial_name_hash(c, hash);
227 qstr->hash = end_name_hash(hash);
237 adfs_compare(
const struct dentry *parent,
const struct inode *pinode,
239 unsigned int len,
const char *
str,
const struct qstr *name)
243 if (len != name->len)
246 for (i = 0; i < name->len; i++) {
252 if (a >=
'A' && a <=
'Z')
254 if (b >=
'A' && b <=
'Z')
265 .d_compare = adfs_compare,
268 static struct dentry *
269 adfs_lookup(
struct inode *dir,
struct dentry *dentry,
unsigned int flags)
271 struct inode *inode =
NULL;
275 error = adfs_dir_lookup_byname(dir, &dentry->
d_name, &obj);
286 d_add(dentry, inode);
287 return ERR_PTR(error);
294 .lookup = adfs_lookup,