aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt8
-rw-r--r--pseudo.c6
-rw-r--r--pseudo.h2
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index dee80f3..6d91bb3 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,11 @@
+2018-04-13:
+ * (seebs) Reduce spamminess of path mismatches.
+ Don't log path mismatches with multiple links unless you've
+ requested path+verbose debugging. Also allow pseudo_debug
+ to take a 0 to indicate "always debug", because we want that
+ message unconditionally, and I don't want near-identical
+ calls to diag() and debug().
+
2018-04-02:
* (seebs) Change default copyright notice in guts to
say "Peter Seebach" rather than "Wind River" as I haven't
diff --git a/pseudo.c b/pseudo.c
index 90de051..4dfd017 100644
--- a/pseudo.c
+++ b/pseudo.c
@@ -706,7 +706,11 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
msg->path);
pdb_did_unlink_file(path_by_ino, &by_ino, by_ino.deleting);
} else {
- pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n",
+ int flags = 0;
+ if (msg->nlink > 1) {
+ flags = PDBGF_FILE | PDBGF_VERBOSE;
+ }
+ pseudo_debug(flags, "path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n",
msg->nlink,
msg->nlink == 1 ? "" : "s",
(unsigned long long) msg_header.ino,
diff --git a/pseudo.h b/pseudo.h
index a39b3b3..1684ede 100644
--- a/pseudo.h
+++ b/pseudo.h
@@ -53,7 +53,7 @@ extern void pseudo_evlog_dump(void);
if ((x) & PDBGF_VERBOSE) { \
if ((pseudo_util_debug_flags & PDBGF_VERBOSE) && (pseudo_util_debug_flags & ((x) & ~PDBGF_VERBOSE))) { pseudo_diag(__VA_ARGS__); } \
} else { \
- if (pseudo_util_debug_flags & (x)) { pseudo_diag(__VA_ARGS__); } \
+ if ((pseudo_util_debug_flags & (x)) || ((x) == 0)) { pseudo_diag(__VA_ARGS__); } \
} \
} while (0)
#define pseudo_debug_call(x, fn, ...) do { \