aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-16 13:17:09 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-16 22:03:09 -0400
commit156eefca454e10440d1070f7500e1708589fc64b (patch)
tree90aeb8d83340f1b4bedda195245ec5883f77fa27 /src/common/compat.c
parent8dc6755f6d65d7ff847bd5e8cf681e6de7fabbc5 (diff)
downloadtor-156eefca454e10440d1070f7500e1708589fc64b.tar
tor-156eefca454e10440d1070f7500e1708589fc64b.tar.gz
Make sure everything using an interned string is preceded by a log
(It's nice to know what we were about to rename before we died from renaming it.)
Diffstat (limited to 'src/common/compat.c')
-rw-r--r--src/common/compat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 5c1853528..c5945fbd2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -144,6 +144,7 @@ tor_open_cloexec(const char *path, int flags, unsigned mode)
return -1;
#endif
+ log_debug(LD_FS, "Opening %s with flags %x", path, flags);
fd = open(path, flags, mode);
#ifdef FD_CLOEXEC
if (fd >= 0) {
@@ -179,6 +180,7 @@ tor_fopen_cloexec(const char *path, const char *mode)
int
tor_rename(const char *path_old, const char *path_new)
{
+ log_debug(LD_FS, "Renaming %s to %s", path_old, path_new);
return rename(sandbox_intern_string(path_old),
sandbox_intern_string(path_new));
}