diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-04-03 16:26:38 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-04-04 10:40:01 +0200 |
commit | 70de006670880df7931fb1c39966d181e2893a61 (patch) | |
tree | 2f9906b5cac64ed02bb1985f8aaae19c0b15317c /sal/osl/unx/uunxapi.cxx | |
parent | dc3e213dcd81be3eee8d139ea5ad55606a44eeff (diff) |
Show flags and modes symbolically in the SAL_INFO() for open() and access()
Change-Id: I0d3f7f7216d35bb6f636797894832a4714bcc388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91677
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sal/osl/unx/uunxapi.cxx')
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index e8901784c878..3c358c8523a8 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -183,9 +183,9 @@ int osl::access(const OString& pstrPath, int mode) int result = ::access(fn.getStr(), mode); int saved_errno = errno; if (result == -1) - SAL_INFO("sal.file", "access(" << fn << ",0" << std::oct << mode << std::dec << "): " << UnixErrnoString(saved_errno)); + SAL_INFO("sal.file", "access(" << fn << "," << osl::accessModeToString(mode) << "): " << UnixErrnoString(saved_errno)); else - SAL_INFO("sal.file", "access(" << fn << ",0" << std::oct << mode << std::dec << "): OK"); + SAL_INFO("sal.file", "access(" << fn << "," << osl::accessModeToString(mode) << "): OK"); done_accessing_file_path(fn.getStr(), state); @@ -360,9 +360,9 @@ int open_c(const char *cpPath, int oflag, int mode) int result = open(cpPath, oflag, mode); int saved_errno = errno; if (result == -1) - SAL_INFO("sal.file", "open(" << cpPath << ",0" << std::oct << oflag << ",0" << mode << std::dec << "): " << UnixErrnoString(saved_errno)); + SAL_INFO("sal.file", "open(" << cpPath << "," << osl::openFlagsToString(oflag) << "," << osl::openModeToString(mode) << "): " << UnixErrnoString(saved_errno)); else - SAL_INFO("sal.file", "open(" << cpPath << ",0" << std::oct << oflag << ",0" << mode << std::dec << ") => " << result); + SAL_INFO("sal.file", "open(" << cpPath << "," << osl::openFlagsToString(oflag) << "," << osl::openModeToString(mode) << ") => " << result); #if HAVE_FEATURE_MACOSX_SANDBOX if (isSandboxed && result != -1 && (oflag & O_CREAT) && (oflag & O_EXCL)) |