From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A08F6C433ED for ; Thu, 29 Apr 2021 16:00:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F7556144B for ; Thu, 29 Apr 2021 16:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240703AbhD2QA4 (ORCPT ); Thu, 29 Apr 2021 12:00:56 -0400 Received: from mga03.intel.com ([134.134.136.65]:48372 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbhD2QAx (ORCPT ); Thu, 29 Apr 2021 12:00:53 -0400 IronPort-SDR: wceLzUCvMrK7YJC8tG2F1WFMjawyN8DJae4zL6hhozS+j12Ju+Jd9zUMiLjpJc/mXX1IzdPNTR 9s827i853Rpw== X-IronPort-AV: E=McAfee;i="6200,9189,9969"; a="197084677" X-IronPort-AV: E=Sophos;i="5.82,259,1613462400"; d="scan'208";a="197084677" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2021 09:00:04 -0700 IronPort-SDR: U/8yaxw3td/+8z60rk5UsvHskzKR999+tiqEUo30+iUBySpk6PSxgfNAWHCgSdYUzZ+/NHfAU7 QdLx0yWPtq9A== X-IronPort-AV: E=Sophos;i="5.82,259,1613462400"; d="scan'208";a="466397550" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2021 09:00:04 -0700 Date: Thu, 29 Apr 2021 09:00:03 -0700 From: Andi Kleen To: Adrian Hunter Cc: Arnaldo Carvalho de Melo , Jiri Olsa , linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/12] perf inject: Add facility to do in place update Message-ID: <20210429160003.GC4032392@tassilo.jf.intel.com> References: <20210429125854.13905-1-adrian.hunter@intel.com> <20210429125854.13905-5-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210429125854.13905-5-adrian.hunter@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + 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.