From 1a1d77dd589de5a567fa95e36aa6999c704ceca4 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 28 Aug 2000 22:00:09 +0000 Subject: Merge with 2.4.0-test7. --- fs/fat/dir.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'fs/fat') diff --git a/fs/fat/dir.c b/fs/fat/dir.c index bbb895285..5f7a643d7 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -313,7 +313,7 @@ static int fat_readdirx(struct inode *inode, struct file *filp, void *dirent, /* Fake . and .. for the root directory. */ if (inode->i_ino == MSDOS_ROOT_INO) { while (cpos < 2) { - if (filldir(dirent, "..", cpos+1, cpos, MSDOS_ROOT_INO) < 0) + if (filldir(dirent, "..", cpos+1, cpos, MSDOS_ROOT_INO, DT_DIR) < 0) return 0; cpos++; filp->f_pos++; @@ -466,7 +466,8 @@ ParseLong: if (!long_slots||shortnames) { if (both) bufname[i] = '\0'; - if (filldir(dirent, bufname, i, *furrfu, inum) < 0) + if (filldir(dirent, bufname, i, *furrfu, inum, + (de->attr & ATTR_DIR) ? DT_DIR : DT_REG) < 0) goto FillFailed; } else { char longname[275]; @@ -478,7 +479,8 @@ ParseLong: memcpy(&longname[long_len+1], bufname, i); long_len += i; } - if (filldir(dirent, longname, long_len, *furrfu, inum) < 0) + if (filldir(dirent, longname, long_len, *furrfu, inum, + (de->attr & ATTR_DIR) ? DT_DIR : DT_REG) < 0) goto FillFailed; } @@ -508,7 +510,8 @@ static int vfat_ioctl_fill( const char * name, int name_len, off_t offset, - ino_t ino) + ino_t ino, + unsigned int d_type) { struct dirent *d1 = (struct dirent *)buf; struct dirent *d2 = d1 + 1; -- cgit v1.2.3