From 426c1836d56015da2ca2300251c256f3f2ec6a2b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 14 Oct 2003 22:24:26 +0000 Subject: [PATCH] * vfs.h: Remove all references to seekdir and telldir. Adjust all dependencies. --- vfs/ChangeLog | 5 +++++ vfs/direntry.c | 29 ----------------------------- vfs/extfs.c | 26 -------------------------- vfs/local.c | 25 ------------------------- vfs/vfs.c | 19 ------------------- vfs/vfs.h | 4 ---- 6 files changed, 5 insertions(+), 103 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 9e998cacc..9a73bebe2 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2003-10-14 Pavel Roskin + + * vfs.h: Remove all references to seekdir and telldir. Adjust + all dependencies. + 2003-10-13 Pavel Roskin * vfs.c (_vfs_add_noncurrent_stamps): Fix incorrect casts. diff --git a/vfs/direntry.c b/vfs/direntry.c index 7cacfafcc..df97270a2 100644 --- a/vfs/direntry.c +++ b/vfs/direntry.c @@ -627,33 +627,6 @@ vfs_s_readdir(void *data) return (void *) &dir; } -static int -vfs_s_telldir (void *data) -{ - struct dirhandle *info = (struct dirhandle *) data; - struct vfs_s_entry *cur; - int num = 0; - - cur = info->dir->subdir; - while (cur!=NULL){ - if (cur == info->cur) - return num; - num++; - cur = cur->next; - } - return -1; -} - -static void -vfs_s_seekdir (void *data, int offset) -{ - struct dirhandle *info = (struct dirhandle *) data; - int i; - info->cur = info->dir->subdir; - for (i=0; iopendir = vfs_s_opendir; vclass->readdir = vfs_s_readdir; vclass->closedir = vfs_s_closedir; - vclass->telldir = vfs_s_telldir; - vclass->seekdir = vfs_s_seekdir; vclass->stat = vfs_s_stat; vclass->lstat = vfs_s_lstat; vclass->fstat = vfs_s_fstat; diff --git a/vfs/extfs.c b/vfs/extfs.c index d6beb4782..a90fb6efa 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -909,30 +909,6 @@ static void * s_readdir(void *data) return (void *) &dir; } -static int s_telldir (void *data) -{ - struct entry **info = (struct entry **) data; - struct entry *cur; - int num = 0; - - cur = info[1]; - while (cur!=NULL) { - if (cur == info[0]) return num; - num++; - cur = cur->next_in_dir; - } - return -1; -} - -static void s_seekdir (void *data, int offset) -{ - struct entry **info = (struct entry **) data; - int i; - info[0] = info[1]; - for (i=0; iseekdir) - (*vfs->seekdir) (vfs_info (handle), offset); - else - errno = E_NOTSUPP; -} - #define MC_DIROP(name, type, onerr ) \ type mc_##name (DIR *dirp) \ { \ @@ -543,7 +525,6 @@ type mc_##name (DIR *dirp) \ } MC_DIROP (readdir, struct dirent *, NULL) -MC_DIROP (telldir, int, -1) int mc_closedir (DIR *dirp) diff --git a/vfs/vfs.h b/vfs/vfs.h index 619551a24..3d34d1c18 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -42,8 +42,6 @@ struct vfs_class { void *(*opendir) (struct vfs_class *me, char *dirname); void *(*readdir) (void *vfs_info); int (*closedir) (void *vfs_info); - int (*telldir) (void *vfs_info); - void (*seekdir) (void *vfs_info, int offset); int (*stat) (struct vfs_class *me, char *path, struct stat * buf); int (*lstat) (struct vfs_class *me, char *path, struct stat * buf); @@ -163,8 +161,6 @@ int mc_chdir (char *); DIR *mc_opendir (char *dirname); struct dirent *mc_readdir (DIR * dirp); int mc_closedir (DIR * dir); -int mc_telldir (DIR * dir); -void mc_seekdir (DIR * dir, int offset); int mc_stat (const char *path, struct stat *buf); int mc_lstat (const char *path, struct stat *buf);