patch-2.4.0-test7 linux/fs/fat/dir.c
Next file: linux/fs/fcntl.c
Previous file: linux/fs/ext2/dir.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Sun Aug 13 12:01:54 2000
- Orig file:
v2.4.0-test6/linux/fs/fat/dir.c
- Orig date:
Wed Aug 9 19:19:51 2000
diff -u --recursive --new-file v2.4.0-test6/linux/fs/fat/dir.c linux/fs/fat/dir.c
@@ -313,7 +313,7 @@
/* 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 @@
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 @@
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 @@
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;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)