-/*
- put the directory to sleep. Used between search calls to give the
- right directory change semantics
-*/
-void pvfs_list_hibernate(struct pvfs_dir *dir)
-{
- if (dir->dir) {
- closedir(dir->dir);
- dir->dir = NULL;
- }
-}
-
-
-/*
- wake up the directory search
-*/
-NTSTATUS pvfs_list_wakeup(struct pvfs_dir *dir, uint_t *ofs)
-{
- if (dir->no_wildcard ||
- dir->dir != NULL) {
- return NT_STATUS_OK;
- }
-
- dir->dir = opendir(dir->unix_path);
- if (dir->dir == NULL) {
- dir->end_of_search = True;
- return pvfs_map_errno(dir->pvfs, errno);
- }
-
- seekdir(dir->dir, *ofs);
- dir->offset = telldir(dir->dir);
- if (dir->offset != *ofs) {
- DEBUG(0,("pvfs_list_wakeup: search offset changed %u -> %u\n",
- *ofs, (unsigned)dir->offset));
- }
-
- return NT_STATUS_OK;
-}
-
-
-