1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

Forgot about closedir() function for VFS. Hoo embarassing.

(This used to be commit c1cbe07c0391c36066b068fdd42bf1aa40259a5c)
This commit is contained in:
Tim Potter 1999-04-08 03:01:18 +00:00
parent bc40376caa
commit 06c7ec8485
4 changed files with 13 additions and 2 deletions

View File

@ -629,6 +629,7 @@ struct vfs_ops {
struct dirent *(*readdir)(DIR *dirp);
int (*mkdir)(char *path, mode_t mode);
int (*rmdir)(char *path);
int (*closedir)(DIR *dir);
/* File operations */

View File

@ -524,7 +524,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
if (!p) return(NULL);
dirp = (Dir *)malloc(sizeof(Dir));
if (!dirp) {
closedir(p);
conn->vfs_ops.closedir(p);
return(NULL);
}
dirp->pos = dirp->numentries = dirp->mallocsize = 0;
@ -554,7 +554,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
dirp->numentries++;
}
closedir(p);
conn->vfs_ops.closedir(p);
return((void *)dirp);
}

View File

@ -66,6 +66,14 @@ int vfswrap_rmdir(char *path)
return result;
}
int vfswrap_closedir(DIR *dirp)
{
int result;
result = closedir(path);
return result;
}
/* File operations */
int vfswrap_open(char *fname, int flags, mode_t mode)

View File

@ -53,6 +53,7 @@ struct vfs_syminfo vfs_syminfo[] = {
{"vfs_readdir", &dl_ops.readdir},
{"vfs_mkdir", &dl_ops.mkdir},
{"vfs_rmdir", &dl_ops.rmdir},
{"vfs_closedir", &dl_ops.closedir},
/* File operations */
@ -95,6 +96,7 @@ struct vfs_ops default_vfs_ops = {
vfswrap_readdir,
vfswrap_mkdir,
vfswrap_rmdir,
vfswrap_closedir,
/* File operations */