diff options
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/dir_cap.c | 15 | ||||
-rw-r--r-- | fs/hfs/dir_dbl.c | 11 | ||||
-rw-r--r-- | fs/hfs/dir_nat.c | 16 |
3 files changed, 26 insertions, 16 deletions
diff --git a/fs/hfs/dir_cap.c b/fs/hfs/dir_cap.c index bca53e087..9dfb4ab82 100644 --- a/fs/hfs/dir_cap.c +++ b/fs/hfs/dir_cap.c @@ -190,7 +190,7 @@ static int cap_readdir(struct file * filp, if (filp->f_pos == 0) { /* Entry 0 is for "." */ - if (filldir(dirent, DOT->Name, DOT_LEN, 0, dir->i_ino)) { + if (filldir(dirent, DOT->Name, DOT_LEN, 0, dir->i_ino, DT_DIR)) { return 0; } filp->f_pos = 1; @@ -207,7 +207,7 @@ static int cap_readdir(struct file * filp, } if (filldir(dirent, DOT_DOT->Name, - DOT_DOT_LEN, 1, ntohl(cnid))) { + DOT_DOT_LEN, 1, ntohl(cnid), DT_DIR)) { return 0; } filp->f_pos = 2; @@ -234,7 +234,7 @@ static int cap_readdir(struct file * filp, len = hfs_namein(dir, tmp_name, &((struct hfs_cat_key *)brec.key)->CName); if (filldir(dirent, tmp_name, len, - filp->f_pos, ino)) { + filp->f_pos, ino, DT_UNKNOWN)) { hfs_cat_close(entry, &brec); return 0; } @@ -250,7 +250,8 @@ static int cap_readdir(struct file * filp, /* In root dir last-2 entry is for ".rootinfo" */ if (filldir(dirent, DOT_ROOTINFO->Name, DOT_ROOTINFO_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_CAP_FNDR)) { + ntohl(entry->cnid) | HFS_CAP_FNDR, + DT_UNKNOWN)) { return 0; } } @@ -262,7 +263,8 @@ static int cap_readdir(struct file * filp, /* In normal dirs last-1 entry is for ".finderinfo" */ if (filldir(dirent, DOT_FINDERINFO->Name, DOT_FINDERINFO_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_CAP_FDIR)) { + ntohl(entry->cnid) | HFS_CAP_FDIR, + DT_UNKNOWN)) { return 0; } } @@ -274,7 +276,8 @@ static int cap_readdir(struct file * filp, /* In normal dirs last entry is for ".resource" */ if (filldir(dirent, DOT_RESOURCE->Name, DOT_RESOURCE_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_CAP_RDIR)) { + ntohl(entry->cnid) | HFS_CAP_RDIR, + DT_UNKNOWN)) { return 0; } } diff --git a/fs/hfs/dir_dbl.c b/fs/hfs/dir_dbl.c index 3d613a8e3..8e39508fa 100644 --- a/fs/hfs/dir_dbl.c +++ b/fs/hfs/dir_dbl.c @@ -183,7 +183,8 @@ static int dbl_readdir(struct file * filp, if (filp->f_pos == 0) { /* Entry 0 is for "." */ - if (filldir(dirent, DOT->Name, DOT_LEN, 0, dir->i_ino)) { + if (filldir(dirent, DOT->Name, DOT_LEN, 0, dir->i_ino, + DT_DIR)) { return 0; } filp->f_pos = 1; @@ -192,7 +193,7 @@ static int dbl_readdir(struct file * filp, if (filp->f_pos == 1) { /* Entry 1 is for ".." */ if (filldir(dirent, DOT_DOT->Name, DOT_DOT_LEN, 1, - hfs_get_hl(entry->key.ParID))) { + hfs_get_hl(entry->key.ParID), DT_DIR)) { return 0; } filp->f_pos = 2; @@ -229,7 +230,8 @@ static int dbl_readdir(struct file * filp, &((struct hfs_cat_key *)brec.key)->CName); } - if (filldir(dirent, tmp_name, len, filp->f_pos, ino)) { + if (filldir(dirent, tmp_name, len, filp->f_pos, ino, + DT_UNKNOWN)) { hfs_cat_close(entry, &brec); return 0; } @@ -243,7 +245,8 @@ static int dbl_readdir(struct file * filp, /* In root dir last entry is for "%RootInfo" */ if (filldir(dirent, PCNT_ROOTINFO->Name, PCNT_ROOTINFO_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_DBL_HDR)) { + ntohl(entry->cnid) | HFS_DBL_HDR, + DT_UNKNOWN)) { return 0; } } diff --git a/fs/hfs/dir_nat.c b/fs/hfs/dir_nat.c index 992a94b67..4d050e698 100644 --- a/fs/hfs/dir_nat.c +++ b/fs/hfs/dir_nat.c @@ -191,7 +191,8 @@ static int nat_readdir(struct file * filp, if (filp->f_pos == 0) { /* Entry 0 is for "." */ - if (filldir(dirent, DOT->Name, DOT_LEN, 0, dir->i_ino)) { + if (filldir(dirent, DOT->Name, DOT_LEN, 0, dir->i_ino, + DT_DIR)) { return 0; } filp->f_pos = 1; @@ -208,7 +209,7 @@ static int nat_readdir(struct file * filp, } if (filldir(dirent, DOT_DOT->Name, - DOT_DOT_LEN, 1, ntohl(cnid))) { + DOT_DOT_LEN, 1, ntohl(cnid), DT_DIR)) { return 0; } filp->f_pos = 2; @@ -235,7 +236,7 @@ static int nat_readdir(struct file * filp, len = hfs_namein(dir, tmp_name, &((struct hfs_cat_key *)brec.key)->CName); if (filldir(dirent, tmp_name, len, - filp->f_pos, ino)) { + filp->f_pos, ino, DT_UNKNOWN)) { hfs_cat_close(entry, &brec); return 0; } @@ -250,14 +251,16 @@ static int nat_readdir(struct file * filp, /* In normal dirs entry 2 is for ".AppleDouble" */ if (filldir(dirent, DOT_APPLEDOUBLE->Name, DOT_APPLEDOUBLE_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_NAT_HDIR)) { + ntohl(entry->cnid) | HFS_NAT_HDIR, + DT_UNKNOWN)) { return 0; } } else if (type == HFS_NAT_HDIR) { /* In .AppleDouble entry 2 is for ".Parent" */ if (filldir(dirent, DOT_PARENT->Name, DOT_PARENT_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_NAT_HDR)) { + ntohl(entry->cnid) | HFS_NAT_HDR, + DT_UNKNOWN)) { return 0; } } @@ -270,7 +273,8 @@ static int nat_readdir(struct file * filp, (type == HFS_NAT_HDIR)) { if (filldir(dirent, ROOTINFO->Name, ROOTINFO_LEN, filp->f_pos, - ntohl(entry->cnid) | HFS_NAT_HDR)) { + ntohl(entry->cnid) | HFS_NAT_HDR, + DT_UNKNOWN)) { return 0; } } |