Messages in this thread Patches in this message | | | Date | Tue, 09 Dec 2003 10:47:32 +0100 | From | Domen Puncer <> | Subject | [PATCH 2.4.23, 2.6.0-test11] fix d_type in readdir in isofs |
| |
Hi!
Played with scandir, and noticed iso9660's files d_type is always 0, so here's a fix.
If there are no objections i'll try to fix some other filesystems too.
2.6.0-test11: --- c/fs/isofs/dir.c 2003-08-23 01:58:53.000000000 +0200 +++ a/fs/isofs/dir.c 2003-12-09 10:29:21.000000000 +0100 @@ -230,7 +230,8 @@ } } if (len > 0) { - if (filldir(dirent, p, len, filp->f_pos, inode_number, DT_UNKNOWN) < 0) + if (filldir(dirent, p, len, filp->f_pos, inode_number, + (de->flags[0]&2)?DT_DIR:DT_REG) < 0) break; } filp->f_pos += de_len;
2.4.23: --- linux-2.4.23-clean/fs/isofs/dir.c 2002-02-25 20:38:08.000000000 +0100 +++ linux-2.4.23/fs/isofs/dir.c 2003-12-09 10:28:58.000000000 +0100 @@ -230,7 +230,8 @@ } } if (len > 0) { - if (filldir(dirent, p, len, filp->f_pos, inode_number, DT_UNKNOWN) < 0) + if (filldir(dirent, p, len, filp->f_pos, inode_number, + (de->flags[0]&2)?DT_DIR:DT_REG) < 0) break; } filp->f_pos += de_len; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |