tst: passthrough-fuse: windows-posix layer

This commit is contained in:
Bill Zissimopoulos 2017-01-29 12:44:18 -08:00
parent c252382204
commit 075d1821a2
3 changed files with 8 additions and 0 deletions

View File

@ -171,6 +171,7 @@ static int ptfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, fus
DIR *dirp = (DIR *)fi->fh;
struct dirent *de;
rewinddir(dirp);
for (;;)
{
errno = 0;

View File

@ -355,6 +355,12 @@ DIR *opendir(const char *path)
return dirp;
}
void rewinddir(DIR *dirp)
{
if (INVALID_HANDLE_VALUE != dirp->handle)
FindClose(dirp->handle);
}
struct dirent *readdir(DIR *dirp)
{
WIN32_FIND_DATAA FindData;

View File

@ -58,6 +58,7 @@ int mkdir(const char *path, fuse_mode_t mode);
int rmdir(const char *path);
DIR *opendir(const char *path);
void rewinddir(DIR *dirp);
struct dirent *readdir(DIR *dirp);
int closedir(DIR *dirp);