Go to the source code of this file.
◆ fdatasync()
Definition at line 23 of file win32fdatasync.c.
24{
25 IO_STATUS_BLOCK iosb;
26 NTSTATUS status;
27 HANDLE handle;
28
29 handle = (HANDLE) _get_osfhandle(
fd);
30 if (handle == INVALID_HANDLE_VALUE)
31 {
32 errno = EBADF;
33 return -1;
34 }
35
37 return -1;
38
39 memset(&iosb, 0, sizeof(iosb));
42 NULL,
43 0,
44 &iosb);
45
46 if (NT_SUCCESS(status))
47 return 0;
48
50 return -1;
51}
static int fd(const char *x, int i)
void _dosmaperr(unsigned long)
PGDLLIMPORT NtFlushBuffersFileEx_t pg_NtFlushBuffersFileEx
int initialize_ntdll(void)
#define FLUSH_FLAGS_FILE_DATA_SYNC_ONLY
PGDLLIMPORT RtlNtStatusToDosError_t pg_RtlNtStatusToDosError
References _dosmaperr(), fd(), FLUSH_FLAGS_FILE_DATA_SYNC_ONLY, initialize_ntdll(), pg_NtFlushBuffersFileEx, and pg_RtlNtStatusToDosError.
Referenced by pg_fdatasync(), and test_sync().