From: Thomas Weißschuh Date: Fri, 8 Dec 2023 17:10:34 +0000 (+0100) Subject: dmesg: error out instead of silently ignoring force_prefix X-Git-Tag: v2.40-rc1~111^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ead076318216203162da24ac1d2759f579b178b5;p=thirdparty%2Futil-linux.git dmesg: error out instead of silently ignoring force_prefix 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 --- 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);