chardev: add logtimestamp option

Add an option to inject timestamps into serial log file.
That simplifies debugging a lot, when you can simply compare
QEMU logs with guest console logs.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260201173633.413934-4-vsementsov@yandex-team.ru>
This commit is contained in:
Vladimir Sementsov-Ogievskiy
2026-02-01 20:36:31 +03:00
committed by Marc-André Lureau
parent 2eed5472ec
commit b108dcbebc
3 changed files with 65 additions and 6 deletions

View File

@@ -63,6 +63,8 @@ struct Chardev {
CharFrontend *fe;
char *label;
int logfd;
bool logtimestamp;
bool log_line_start;
int be_open;
/* used to coordinate the chardev-change special-case: */
bool handover_yank_instance;