]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
dmesg: fix raw output
authorKarel Zak <kzak@redhat.com>
Thu, 5 Apr 2018 13:59:59 +0000 (15:59 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 5 Apr 2018 14:03:58 +0000 (16:03 +0200)
The commit 5f538ac40c0d215b6c9a881effe4c3b214366715 has introduced
regression ("goto" to the wrong place, so timestamps in raw mode is
not printed at all).

Addresses: https://github.com/karelzak/util-linux/issues/614
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/dmesg.c

index 22c381c1d2efbcef6a87301c4c048b709cfd5046..ba4e2252837d717171e5f3e26bceb4824b7b326f 100644 (file)
@@ -906,7 +906,7 @@ static void print_record(struct dmesg_control *ctl,
                                       LOG_MAKEPRI(rec->facility, rec->level),
                                       (long) rec->tv.tv_sec,
                                       (long) rec->tv.tv_usec);
-               goto mesg_output;
+               goto full_output;
        }
 
        /* Store decode information (facility & priority level) in a buffer */
@@ -1008,7 +1008,6 @@ full_output:
                        color_disable();
        }
 
-mesg_output:
        /*
         * A kernel message may contain several lines of output, separated
         * by '\n'.  If the timestamp and decode outputs are forced then each