core: Drain fdatasync() API into libgsystem
Just code cleanup.
This commit is contained in:
1 parent
2db497fd3f
commit
47bd290065
4 files changed
+7
-57
No files matched your search
@@ -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:
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user