From: Yu Watanabe Date: Wed, 19 Mar 2025 01:51:35 +0000 (+0900) Subject: logs-show: comment out dead code X-Git-Tag: v258-rc1~1042^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11065c598c980ee856a1dc5d593e5510ef924ef9;p=thirdparty%2Fsystemd.git logs-show: comment out dead code Follow-up for 280e85224e6273f1835a41782f2e3abd7582dd2e. Fixes CID#1548921 and CID#1548922. --- diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index cc66503819f..664bffbc715 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -458,14 +458,11 @@ static void parse_display_realtime( const char *source_monotonic, usec_t *ret) { - usec_t t, s, u; + usec_t t; assert(j); assert(ret); - // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime. - source_monotonic = NULL; - /* First, try _SOURCE_REALTIME_TIMESTAMP. */ if (source_realtime && safe_atou64(source_realtime, &t) >= 0 && VALID_REALTIME(t)) { *ret = t; @@ -479,11 +476,15 @@ static void parse_display_realtime( } /* If _SOURCE_MONOTONIC_TIMESTAMP is provided, adjust the header timestamp. */ + // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime. + /* + usec_t s, u; if (source_monotonic && safe_atou64(source_monotonic, &s) >= 0 && VALID_MONOTONIC(s) && sd_journal_get_monotonic_usec(j, &u, &(sd_id128_t) {}) >= 0) { *ret = map_clock_usec_raw(t, u, s); return; } + */ /* Otherwise, use the header timestamp as is. */ *ret = t; @@ -504,14 +505,14 @@ static void parse_display_timestamp( assert(ret_display_ts); assert(ret_boot_id); - // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime. - source_monotonic = NULL; - if (source_realtime && safe_atou64(source_realtime, &t) >= 0 && VALID_REALTIME(t)) source_ts.realtime = t; + // FIXME: _SOURCE_MONOTONIC_TIMESTAMP is in CLOCK_BOOTTIME, hence we cannot use it for adjusting realtime. + /* if (source_monotonic && safe_atou64(source_monotonic, &t) >= 0 && VALID_MONOTONIC(t)) source_ts.monotonic = t; + */ (void) sd_journal_get_realtime_usec(j, &header_ts.realtime); (void) sd_journal_get_monotonic_usec(j, &header_ts.monotonic, &boot_id);