tools/record: default to libinput-recording.yml with --autorestart

Warn the user but let's make this as easy as possible to run.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1479>
This commit is contained in:
Peter Hutterer 2026-05-20 09:48:27 +10:00
parent 6378183617
commit 74e1910932
2 changed files with 4 additions and 4 deletions

View file

@ -2764,9 +2764,9 @@ main(int argc, char **argv)
}
if (!usec_is_zero(ctx.timeout) && output_arg == NULL) {
fprintf(stderr, "Option --autorestart requires --output-file\n");
rc = EXIT_INVALID_USAGE;
goto out;
output_arg = "libinput-recording.yml";
fprintf(stderr,
"Option --autorestart requires --output-file, defaulting to libinput-recording.yml\n");
}
ctx.output_file.name = safe_strdup(output_arg);

View file

@ -423,7 +423,7 @@ def test_libinput_record_multiple(libinput_record, recording):
def test_libinput_record_autorestart(libinput_record, recording):
libinput_record.run_command_invalid(["--autorestart"])
libinput_record.run_command_invalid(["--autorestart=2"])
libinput_record.run_command_success(["--autorestart=2"])
libinput_record.run_command_success(["-o", recording, "--autorestart=2"])