tools/record: print a header as first line

To make the file format easier to detect

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-02-22 14:52:16 +10:00
parent 201b81ebe9
commit 59ca971898

View file

@ -1484,6 +1484,7 @@ print_system_header(struct record_context *ctx)
static void
print_header(struct record_context *ctx)
{
iprintf(ctx, "# libinput record\n");
iprintf(ctx, "version: %d\n", FILE_VERSION_NUMBER);
iprintf(ctx, "ndevices: %d\n", ctx->ndevices);
print_libinput_header(ctx);