lkml.org 
[lkml]   [2003]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.033 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site