diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 32023fdf7..5700028d2 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,10 @@ +2002-08-15 Pavel Roskin + + * direntry.c (vfs_s_readdir): Use compute_namelen(). + * extfs.c (s_readdir): Likewise. + * mcfs.c (mcfs_readdir): Likewise. + * smbfs.c (smbfs_readdir): Likewise. + 2002-08-14 Pavel Roskin * vfs.h [!USE_VFS]: Declare mc_setctl as static inline function diff --git a/vfs/direntry.c b/vfs/direntry.c index e660c67ad..72a6bf210 100644 --- a/vfs/direntry.c +++ b/vfs/direntry.c @@ -632,9 +632,7 @@ vfs_s_readdir (void *data) else vfs_die ("Null in structure-can not happen"); -#ifndef DIRENT_LENGTH_COMPUTED - dir.d_namlen = strlen (dir.dir.d_name); -#endif + compute_namelen(&dir.dir); info->cur = info->cur->next; return (void *)&dir; diff --git a/vfs/extfs.c b/vfs/extfs.c index 17e814cca..2d6d9aa1a 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -896,9 +896,7 @@ static void * s_readdir (void *data) strcpy (&(dir.dir.d_name [0]), (*info)->name); -#ifndef DIRENT_LENGTH_COMPUTED - dir.d_namlen = strlen (dir.dir.d_name); -#endif + compute_namelen (&dir.dir); *info = (*info)->next_in_dir; return (void *)&dir; diff --git a/vfs/mcfs.c b/vfs/mcfs.c index 08e900a31..59e15c8ae 100644 --- a/vfs/mcfs.c +++ b/vfs/mcfs.c @@ -748,9 +748,7 @@ static void *mcfs_readdir (void *info) cached_lstat_info = &mcfs_info->current->my_stat; mcfs_info->current = mcfs_info->current->next; -#ifndef DIRENT_LENGTH_COMPUTED - mcfs_readdir_data.dent.d_namlen = strlen (mcfs_readdir_data.dent.d_name); -#endif + compute_namelen (&mcfs_readdir_data.dent); return &mcfs_readdir_data; } diff --git a/vfs/smbfs.c b/vfs/smbfs.c index f8144e137..a8f31d9bd 100644 --- a/vfs/smbfs.c +++ b/vfs/smbfs.c @@ -759,9 +759,7 @@ smbfs_readdir (void *info) pstrcpy (dirent_dest, smbfs_info->current->text); smbfs_info->current = smbfs_info->current->next; -#ifndef DIRENT_LENGTH_COMPUTED - smbfs_readdir_data.dent.d_namlen = strlen (smbfs_readdir_data.dent.d_name); -#endif + compute_namelen(&smbfs_readdir_data.dent); return &smbfs_readdir_data; }