From: Vladimir Sementsov-Ogievskiy Date: Sun, 1 Feb 2026 17:36:30 +0000 (+0300) Subject: error-report: make real_time_iso8601() public X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eed5472ec424d217786af97e6212e68e49c5d0b;p=thirdparty%2Fqemu.git error-report: make real_time_iso8601() public To be reused in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbruster Reviewed-by: Marc-André Lureau Message-ID: <20260201173633.413934-3-vsementsov@yandex-team.ru> --- diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h index 3ae2357fda..dc423d3607 100644 --- a/include/qemu/error-report.h +++ b/include/qemu/error-report.h @@ -74,4 +74,10 @@ extern bool message_with_timestamp; extern bool error_with_guestname; extern const char *error_guest_name; +/* + * Return current datetime in ISO 8601 format. + * Caller is responsible to g_free() the returned string. + */ +char *real_time_iso8601(void); + #endif diff --git a/util/error-report.c b/util/error-report.c index 1b17c11de1..d6b7448183 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -169,8 +169,7 @@ static void print_loc(void) } } -static char * -real_time_iso8601(void) +char *real_time_iso8601(void) { g_autoptr(GDateTime) dt = g_date_time_new_now_utc(); return g_date_time_format_iso8601(dt);