From 5dbcf103454220b7a66a790477b6af3d59da2d9b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 3 Oct 1999 23:31:58 +0000 Subject: 1999-10-03 Roland McGrath * dir.c (ext2_file_type): #if 0 out this variable. (diskfs_get_directs): #if 0 out code to interpret file_type field and set d_type. Instead, always return DT_UNKNOWN for now. --- ext2fs/dir.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ext2fs/dir.c b/ext2fs/dir.c index 0e518f83..9d341b17 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -102,6 +102,7 @@ dirscanblock (vm_address_t blockoff, struct node *dp, int idx, struct dirstat *ds, ino_t *inum); +#if 0 /* XXX unused for now */ static const unsigned char ext2_file_type[EXT2_FT_MAX] = { [EXT2_FT_UNKNOWN] = DT_UNKNOWN, @@ -113,7 +114,7 @@ static const unsigned char ext2_file_type[EXT2_FT_MAX] = [EXT2_FT_SOCK] = DT_SOCK, [EXT2_FT_SYMLINK] = DT_LNK, }; -#if 0 + static const unsigned char file_type_ext2[] = { [DT_UNKNOWN] = EXT2_FT_UNKNOWN, @@ -1013,6 +1014,7 @@ diskfs_get_directs (struct node *dp, userp->d_reclen = rec_len; userp->d_namlen = name_len; +#if 0 /* We don't bother to check the EXT2_FEATURE_INCOMPAT_FILETYPE flag in the superblock, because in old filesystems the file_type field is the high byte of the length field and is @@ -1028,6 +1030,12 @@ diskfs_get_directs (struct node *dp, blkno * DIRBLKSIZ + bufp - buf); userp->d_type = DT_UNKNOWN; } +#else + /* XXX + For complex reasons it might not be correct to return + the filesystem's d_type value to the user. */ + userp->d_type = DT_UNKNOWN; +#endif memcpy (userp->d_name, entryp->name, name_len); userp->d_name[name_len] = '\0'; -- cgit v1.2.3