From 2e368d6bfdfba4efc651b5cfcd37b075deb79e4d Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Mon, 23 May 2022 15:59:24 +0100 Subject: 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. --- src/metastore.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') 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", -- cgit v1.2.1