]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
dmesg: parse level when --color is used
authorSami Kerola <kerolasa@iki.fi>
Sat, 19 Jan 2013 00:09:09 +0000 (00:09 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Jan 2013 09:29:37 +0000 (10:29 +0100)
When user runs with --color it should not need to be combined with
filtering per level or facility, or decoding.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/dmesg.c

index ddab9b4acafd7c625a63ca6ddaa4c70c9cae012e..080fe7d3e93d6674d90001270768067cb222ca78 100644 (file)
@@ -658,7 +658,7 @@ static int get_next_syslog_record(struct dmesg_control *ctl,
                        continue;       /* error or empty line? */
 
                if (*begin == '<') {
-                       if (ctl->fltr_lev || ctl->fltr_fac || ctl->decode)
+                       if (ctl->fltr_lev || ctl->fltr_fac || ctl->decode || ctl->color)
                                begin = parse_faclev(begin + 1, &rec->facility,
                                                     &rec->level);
                        else