The pager is necessary only for SYSLOG_ACTION_READ* actions (print
kernel messages). Let's remove redundant global initialization.
Based on patch from Dragan Simic.
Signed-off-by: Karel Zak <kzak@redhat.com>
ctl.suspended_time = dmesg_get_suspended_time();
}
- if (delta)
+ if (delta) {
switch (ctl.time_fmt) {
case DMESG_TIMEFTM_CTIME:
ctl.time_fmt = DMESG_TIMEFTM_CTIME_DELTA;
default:
ctl.time_fmt = DMESG_TIMEFTM_DELTA;
}
-
+ }
if (!ctl.json)
ctl.color = colors_init(colormode, "dmesg") ? 1 : 0;
if (ctl.follow)
nopager = 1;
ctl.pager = nopager ? 0 : ctl.pager;
- if (ctl.pager)
- pager_redirect();
switch (ctl.action) {
case SYSLOG_ACTION_READ_ALL: