summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 910345d74f28..6ef6196f8c37 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1061,15 +1061,19 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
- SAL_INFO("sal.file", "osl_syncFile(" << pImpl->m_fd << ")");
-
oslFileError result = pImpl->syncFile();
if (result != osl_File_E_None)
return result;
if (fsync(pImpl->m_fd) == -1)
+ {
+ int e = errno;
+ SAL_INFO("sal.file", "fsync(" << pImpl->m_fd << "): errno " << e << ": " << strerror(e));
return oslTranslateFileError(errno);
+ }
+ else
+ SAL_INFO("sal.file", "fsync(" << pImpl->m_fd << "): OK");
return osl_File_E_None;
}