core: Drain fdatasync() API into libgsystem

Just code cleanup.
This commit is contained in:
Colin Walters committed 2013-01-04 17:25:32 -05:00
1 parent 2db497fd3f
commit 47bd290065
4 files changed
+7 -57

No files matched your search

-20
View File
@@ -190,26 +190,6 @@ ot_util_fatal_gerror (GError *error)
ot_util_fatal_literal (error->message);
}
/**
* ot_unix_fdatasync:
*
* Like fdatasync(), but uses #GError, and handles EINTR.
*/
gboolean
ot_unix_fdatasync (int fd, GError **error)
{
int result;
do
result = fdatasync (fd);
while (G_UNLIKELY (result != 0 && errno == EINTR));
if (result != 0)
{
ot_util_set_error_from_errno (error, errno);
return FALSE;
}
return TRUE;
}
/**
* ot_unix_close:
*
-2
View File
@@ -55,8 +55,6 @@ gboolean ot_unix_open (const char *path,
int *out_fd,
GError **error);
gboolean ot_unix_fdatasync (int fd, GError **error);
gboolean ot_unix_close (int fd, GError **error);
gboolean ot_unix_open_noatime (const char *path, int *out_fd, GError **error);