From: Alexander Kappner Date: Wed, 13 Aug 2025 11:10:28 +0000 (-0700) Subject: logger: fix incorrect warning message when both --file and a message are specified X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a31355b11c3714cac2b6b60565b639aa32388f1;p=thirdparty%2Futil-linux.git logger: fix incorrect warning message when both --file and a message are specified Logger warns that when both --file and a message are given, the message is ignored. It does the opposite. Fix the warning message to conform to the observed behavior. Example: echo "You will not see this file in the log" > file.txt logger -f file.txt "You will see this message in the log" Signed-off-by: Alexander Kappner --- diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 83b39542f..a674ef0cf 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -1296,7 +1296,7 @@ int main(int argc, char **argv) argc -= optind; argv += optind; if (stdout_reopened && argc) - warnx(_("--file and are mutually exclusive, message is ignored")); + warnx(_("--file and are mutually exclusive; file is ignored")); #ifdef HAVE_LIBSYSTEMD if (jfd) { int ret = journald_entry(&ctl, jfd);