patch-2.4.0-test7 linux/fs/romfs/inode.c
Next file: linux/fs/smbfs/ChangeLog
Previous file: linux/fs/readdir.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Fri Aug 11 14:29:02 2000
- Orig file:
v2.4.0-test6/linux/fs/romfs/inode.c
- Orig date:
Wed Aug 9 19:19:51 2000
diff -u --recursive --new-file v2.4.0-test6/linux/fs/romfs/inode.c linux/fs/romfs/inode.c
@@ -254,6 +254,10 @@
return res;
}
+static unsigned char romfs_dtype_table[] = {
+ DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_SOCK, DT_FIFO
+};
+
static int
romfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
@@ -298,7 +302,8 @@
nextfh = ntohl(ri.next);
if ((nextfh & ROMFH_TYPE) == ROMFH_HRD)
ino = ntohl(ri.spec);
- if (filldir(dirent, fsname, j, offset, ino) < 0) {
+ if (filldir(dirent, fsname, j, offset, ino,
+ romfs_dtype_table[nextfh & ROMFH_TYPE]) < 0) {
return stored;
}
stored++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)