From ead076318216203162da24ac1d2759f579b178b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Fri, 8 Dec 2023 18:10:34 +0100 Subject: [PATCH] dmesg: error out instead of silently ignoring force_prefix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When using the option with one of the input mechanisms the user has to look at the source to figure out why nothing is happening. Signed-off-by: Thomas Weißschuh --- sys-utils/dmesg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 79e1c1690a..4d995ab7f8 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -1641,9 +1641,8 @@ int main(int argc, char *argv[]) errx(EXIT_FAILURE, _("--raw can be used together with --level or " "--facility only when reading messages from /dev/kmsg")); - /* only kmsg supports multi-line messages */ if (ctl.force_prefix && ctl.method != DMESG_METHOD_KMSG) - ctl.force_prefix = 0; + errx(EXIT_FAILURE, _("only kmsg supports multi-line messages")); if (ctl.pager) pager_redirect(); n = process_buffer(&ctl, &buf); -- 2.47.3