tst: passthrough-fuse: windows-posix layer

This commit is contained in:
Bill Zissimopoulos
2017-01-29 10:29:37 -08:00
parent 473914d45f
commit a91e5b01ab
3 changed files with 310 additions and 14 deletions

View File

@ -16,6 +16,7 @@
*/
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@ -195,7 +196,7 @@ static int ptfs_create(const char *path, fuse_mode_t mode, struct fuse_file_info
ptfs_impl_fullpath(path);
int fd;
return -1 != (fd = creat(path, mode)) ? (fi->fh = fd, 0) : -errno;
return -1 != (fd = open(path, O_CREAT | O_EXCL, mode)) ? (fi->fh = fd, 0) : -errno;
}
static int ptfs_ftruncate(const char *path, fuse_off_t off, struct fuse_file_info *fi)