From owner-svn-src-all@freebsd.org Mon Jan 13 22:13:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8D3B1EF061; Mon, 13 Jan 2020 22:13:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47xSY33g7wz4GBr; Mon, 13 Jan 2020 22:13:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 00DMDnST081468 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 13 Jan 2020 14:13:49 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 00DMDnJa081467; Mon, 13 Jan 2020 14:13:49 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 13 Jan 2020 14:13:49 -0800 From: Gleb Smirnoff To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r356706 - head/sbin/savecore Message-ID: <20200113221349.GP39529@FreeBSD.org> References: <202001132201.00DM1cvd045817@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202001132201.00DM1cvd045817@repo.freebsd.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47xSY33g7wz4GBr X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.98 / 15.00]; NEURAL_HAM_MEDIUM(-0.98)[-0.981,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jan 2020 22:13:59 -0000 Eric, looks like this changes content format of info.X, whatever libxo output you choose, thus this change at minimum needs to be documented in UPDATING and in release notes for next release. On Mon, Jan 13, 2020 at 10:01:38PM +0000, Eric van Gyzen wrote: E> Author: vangyzen E> Date: Mon Jan 13 22:01:37 2020 E> New Revision: 356706 E> URL: https://svnweb.freebsd.org/changeset/base/356706 E> E> Log: E> savecore: include time zone in info.N file E> E> This helps with event correlation when machines are distributed E> across multiple time zones. E> E> Format the time with relaxed ISO 8601 for all the usual reasons. E> E> MFC after: 2 weeks E> Sponsored by: Dell EMC Isilon E> E> Modified: E> head/sbin/savecore/savecore.c E> E> Modified: head/sbin/savecore/savecore.c E> ============================================================================== E> --- head/sbin/savecore/savecore.c Mon Jan 13 21:49:27 2020 (r356705) E> +++ head/sbin/savecore/savecore.c Mon Jan 13 22:01:37 2020 (r356706) E> @@ -157,6 +157,8 @@ printheader(xo_handle_t *xo, const struct kerneldumphe E> { E> uint64_t dumplen; E> time_t t; E> + struct tm tm; E> + char time_str[64]; E> const char *stat_str; E> const char *comp_str; E> E> @@ -189,7 +191,10 @@ printheader(xo_handle_t *xo, const struct kerneldumphe E> } E> xo_emit_h(xo, "{P: }{Lwc:Compression}{:compression/%s}\n", comp_str); E> t = dtoh64(h->dumptime); E> - xo_emit_h(xo, "{P: }{Lwc:Dumptime}{:dumptime/%s}", ctime(&t)); E> + localtime_r(&t, &tm); E> + if (strftime(time_str, sizeof(time_str), "%F %T %z", &tm) == 0) E> + time_str[0] = '\0'; E> + xo_emit_h(xo, "{P: }{Lwc:Dumptime}{:dumptime/%s}\n", time_str); E> xo_emit_h(xo, "{P: }{Lwc:Hostname}{:hostname/%s}\n", h->hostname); E> xo_emit_h(xo, "{P: }{Lwc:Magic}{:magic/%s}\n", h->magic); E> xo_emit_h(xo, "{P: }{Lwc:Version String}{:version_string/%s}", E> _______________________________________________ E> svn-src-all@freebsd.org mailing list E> https://lists.freebsd.org/mailman/listinfo/svn-src-all E> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Gleb Smirnoff