summaryrefslogtreecommitdiff
path: root/sal/osl/unx/file_misc.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-10-12 03:06:27 +0300
committerTor Lillqvist <tml@collabora.com>2018-10-12 08:56:20 +0200
commitf8c77cf7ebaf63e3aac85269c637c92a37bc988b (patch)
treeb61fdb424f506b7aa7d98a43cf96ccdf0bc3d3aa /sal/osl/unx/file_misc.cxx
parentfa394eef4017d62549599ded3a62d790bc508582 (diff)
More SAL_INFO("sal.file", ...) tweaks
Change-Id: I999d641b54a53c5a737e82d67a0a1ffa769afd24 Reviewed-on: https://gerrit.libreoffice.org/61700 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sal/osl/unx/file_misc.cxx')
-rw-r--r--sal/osl/unx/file_misc.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 8bc4303dce42..507779c7fe6c 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -196,6 +196,8 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString* ustrDirectoryURL, oslDirect
if( pdir )
{
+ SAL_INFO("sal.file", "opendir(" << path << ") => " << pdir);
+
/* create and initialize impl structure */
oslDirectoryImpl* pDirImpl = static_cast<oslDirectoryImpl*>(malloc( sizeof(oslDirectoryImpl) ));
@@ -214,9 +216,8 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString* ustrDirectoryURL, oslDirect
}
else
{
-#ifdef DEBUG_OSL_FILE
- perror ("osl_openDirectory"); fprintf (stderr, path);
-#endif
+ int e = errno;
+ SAL_INFO("sal.file", "opendir(" << path << "): errno " << e << ": " << strerror(e));
}
}
}
@@ -244,8 +245,14 @@ oslFileError SAL_CALL osl_closeDirectory(oslDirectory pDirectory)
else
#endif
{
- if (closedir( pDirImpl->pDirStruct))
+ if (closedir( pDirImpl->pDirStruct) != 0)
+ {
+ int e = errno;
+ SAL_INFO("sal.file", "closedir(" << pDirImpl->pDirStruct << "): errno " << e << ": " << strerror(e));
err = oslTranslateFileError(errno);
+ }
+ else
+ SAL_INFO("sal.file", "closedir(" << pDirImpl->pDirStruct << "): OK");
}
/* cleanup members */
@@ -461,8 +468,11 @@ oslFileError osl_psz_createDirectory(char const * pszPath, sal_uInt32 flags)
if ( nRet < 0 )
{
nRet=errno;
+ SAL_INFO("sal.file", "mkdir(" << pszPath << ",0" << std::oct << mode << std::dec << "): errno " << nRet << ": " << strerror(nRet));
return oslTranslateFileError(nRet);
}
+ else
+ SAL_INFO("sal.file", "mkdir(" << pszPath << ",0" << std::oct << mode << std::dec << "): OK");
return osl_File_E_None;
}
@@ -476,8 +486,11 @@ static oslFileError osl_psz_removeDirectory( const sal_Char* pszPath )
if ( nRet < 0 )
{
nRet=errno;
+ SAL_INFO("sal.file", "rmdir(" << pszPath << "): errno " << nRet << ": " << strerror(nRet));
return oslTranslateFileError(nRet);
}
+ else
+ SAL_INFO("sal.file", "rmdir(" << pszPath << "): OK");
return osl_File_E_None;
}