summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-12-13 11:31:38 -0500
committerEdward Thomson <ethomson@github.com>2017-02-28 13:27:49 +0000
commite6ed0d2f03625f5d6b60db54fc894902d7ddbc32 (patch)
tree6a40c9e2a5873dac410b1294dfca7fdd2790d938 /src/win32
parent6d3ad7e09ee4b101e8e68f38783e3e4139bc2691 (diff)
downloadlibgit2-e6ed0d2f03625f5d6b60db54fc894902d7ddbc32.tar.gz
odb_loose: fsync tests
Introduce a simple counter that `p_fsync` implements. This is useful for ensuring that `p_fsync` is called when we expect it to be, for example when we have enabled an odb backend to perform `fsync`s when writing objects.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/posix_w32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index fea634b00..5172627b0 100644
--- a/src/win32/posix_w32.c
+++ b/src/win32/posix_w32.c
@@ -113,6 +113,8 @@ int p_fsync(int fd)
{
HANDLE fh = (HANDLE)_get_osfhandle(fd);
+ p_fsync__cnt++;
+
if (fh == INVALID_HANDLE_VALUE) {
errno = EBADF;
return -1;