Re: [PATCH 04/12] perf inject: Add facility to do in place update
From: Adrian Hunter
Date: Thu Apr 29 2021 - 12:22:40 EST
On 29/04/21 7:00 pm, Andi Kleen wrote:
>> + 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.
>
If it is used with --force (or -f) then there is no prompt.