summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2022-05-23 15:59:24 +0100
committerAdam Spragg <adam@spra.gg>2022-05-24 10:12:33 +0100
commit2e368d6bfdfba4efc651b5cfcd37b075deb79e4d (patch)
tree214bf3cd0288041e951848adb2eece453330d59d
parenta0902fe51010645f779e4d02cd46f35e488b8bd2 (diff)
Change "compare" output from MSG_QUIET to MSG_NORMAL.
Compare output is... just output. We shouldn't need to pass two "-q" options to shut it up. Likening the metastore MSG_* levels to syslog() LOG_* levels, MSG_DEBUG works like LOG_DEBUG, and the WARNING/ERROR/CRITICAL also have similar roles. That leaves MSG_NORMAL as the equivalent of LOG_INFO, and MSG_QUIET as the equivalent of LOG_NOTICE. LOG_NOTICE is documented as for "normal, but significant, condition" which tracks what MSG_QUIET is for - things that aren't errors, but that you want to know about even when you've asked for quiet. Whereas the output of "compare" is just regular output. Finding a difference isn't a significant condition - it's exactly what you've asked it to look for.
-rw-r--r--src/metastore.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/metastore.c b/src/metastore.c
index fb70834..7760d3b 100644
--- a/src/metastore.c
+++ b/src/metastore.c
@@ -108,25 +108,25 @@ compare_print(struct metaentry *real, struct metaentry *stored, int cmp)
return;
}
- msg(MSG_QUIET, "%s:\t", real ? real->path : stored->path);
+ msg(MSG_NORMAL, "%s:\t", real ? real->path : stored->path);
if (cmp & DIFF_ADDED)
- msg(MSG_QUIET, "added ", real->path);
+ msg(MSG_NORMAL, "added ", real->path);
if (cmp & DIFF_DELE)
- msg(MSG_QUIET, "removed ", stored->path);
+ msg(MSG_NORMAL, "removed ", stored->path);
if (cmp & DIFF_OWNER)
- msg(MSG_QUIET, "owner ");
+ msg(MSG_NORMAL, "owner ");
if (cmp & DIFF_GROUP)
- msg(MSG_QUIET, "group ");
+ msg(MSG_NORMAL, "group ");
if (cmp & DIFF_MODE)
- msg(MSG_QUIET, "mode ");
+ msg(MSG_NORMAL, "mode ");
if (cmp & DIFF_TYPE)
- msg(MSG_QUIET, "type ");
+ msg(MSG_NORMAL, "type ");
if (cmp & DIFF_MTIME)
- msg(MSG_QUIET, "mtime ");
+ msg(MSG_NORMAL, "mtime ");
if (cmp & DIFF_XATTR)
- msg(MSG_QUIET, "xattr ");
- msg(MSG_QUIET, "\n");
+ msg(MSG_NORMAL, "xattr ");
+ msg(MSG_NORMAL, "\n");
if ((NO_XATTR+0) && cmp & DIFF_XATTR) {
msg(MSG_WARNING, "%s:\txattr difference may be bogus: %s\n",