Re: [PATCH 04/12] perf inject: Add facility to do in place update

From: Andi Kleen
Date: Thu Apr 29 2021 - 12:00:12 EST


> + if (!data.force && !inject.in_place_update_dry_run) {
> + char reply[10];
> +
> + printf("The input file will be updated in place. OK? (y/n) ");
> + if (!fgets(reply, sizeof(reply), stdin) || strcmp(reply, "y\n")) {

Interactive questions could break lots of scripting.

Just error out in this case and require the option.