|
|
673c78 |
From f45fe0768ac09cb5e05b095afa47a0a71e931f84 Mon Sep 17 00:00:00 2001
|
|
|
673c78 |
From: Karel Zak <kzak@redhat.com>
|
|
|
673c78 |
Date: Wed, 20 Apr 2022 14:42:32 +0200
|
|
|
673c78 |
Subject: dmesg: fix --since and --until
|
|
|
673c78 |
|
|
|
673c78 |
Now --since and --until requires any time field in the output (e.g.
|
|
|
673c78 |
--ctime,-T), it means "dmesg --since '1 day ago'" doesn't work, but
|
|
|
673c78 |
"dmesg -T --since '1 day ago'" works as expected.
|
|
|
673c78 |
|
|
|
673c78 |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2076829
|
|
|
673c78 |
Upstream: http://github.com/util-linux/util-linux/commit/c9667633f1f6b7a84116f2af067d1d15c72e6382
|
|
|
673c78 |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
673c78 |
---
|
|
|
673c78 |
sys-utils/dmesg.c | 4 +++-
|
|
|
673c78 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
673c78 |
|
|
|
673c78 |
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
|
|
|
673c78 |
index d301951bb..5c580107a 100644
|
|
|
673c78 |
--- a/sys-utils/dmesg.c
|
|
|
673c78 |
+++ b/sys-utils/dmesg.c
|
|
|
673c78 |
@@ -1539,7 +1539,9 @@ int main(int argc, char *argv[])
|
|
|
673c78 |
|
|
|
673c78 |
if ((is_timefmt(&ctl, RELTIME) ||
|
|
|
673c78 |
is_timefmt(&ctl, CTIME) ||
|
|
|
673c78 |
- is_timefmt(&ctl, ISO8601))) {
|
|
|
673c78 |
+ is_timefmt(&ctl, ISO8601)) ||
|
|
|
673c78 |
+ ctl.since ||
|
|
|
673c78 |
+ ctl.until) {
|
|
|
673c78 |
if (dmesg_get_boot_time(&ctl.boot_time) != 0)
|
|
|
673c78 |
ctl.time_fmt = DMESG_TIMEFTM_NONE;
|
|
|
673c78 |
else
|
|
|
673c78 |
--
|
|
|
673c78 |
2.36.1
|
|
|
673c78 |
|