Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1537245pxy; Thu, 29 Apr 2021 09:02:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR6G5s+2zljXKZOMUGcyHaQhsEwmDdUL5kwYigMcFA3v7MbGnQJiORKTWf/DSBETCHUIwQ X-Received: by 2002:a17:902:ee94:b029:ed:4204:5e44 with SMTP id a20-20020a170902ee94b02900ed42045e44mr340028pld.60.1619712145676; Thu, 29 Apr 2021 09:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619712145; cv=none; d=google.com; s=arc-20160816; b=y7bHFQvlJn5lgfmQcQH/7SstWrdPzfISspQvVa8zOda+sqeA1J699cGDu04fT/MNtJ 6zBeJnQA65yhIU1+C50F0+JN56NxDzjowLBPfw0xhHomRuV95Z7qGCBpspfHoA12GGwX w5HptjKHuLZ5WSIeslpluwG52dR/ZylUj0j3dACl+tbCngdsO0dwh74uYMGhNp1C7w0E Ch1kRk9J1fqJ9mE0f3296e2vyNcOqZDW7kjMVa9G0NLqGuFyH0/7PJ3H+0iX5okGlJrT LfGI+ABVqSAKkgxhzk4mUxH4a/Qz8io3zr7TR5VcKKkXj+8jpLq4fI2mvlqw1WrX/rkn XpQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=VucH8GdPn2bOeTU9bzFrsSVoBXC6bN52W2aqDJt54Lk=; b=cXW6L19y35/R33zKoHbjmHKUZ+CtwNs6cre1ddCJUq2pL+3/+umdxdlMOgxhICDHov LuXsOdZYqZmhmos869ijPKr0g9IwQEUcI4SJ7J1jWSxkuvH+jRxDQdj3fjPF/aTpokH2 r71bHa3OYs+7rXMmlga8wZcomEbjjP9Z+UT1ReVl5l8pwi/hbrfPAvNQiSXbMbPdwj4y TBk28YPhhpMQXYA1SS5yhWVD7f1LMTweX7kqeQC9qrRamQAR1A9vUIyz/0s7XlMh9NGe kJlN2DfHED0WOSl557oSi9/HSiGacBJ9926wj6qTDb309IoNFFFxcwWuB7OYoYL0/QNf +FRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z28si5166377pfg.81.2021.04.29.09.02.08; Thu, 29 Apr 2021 09:02:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233846AbhD2QAz (ORCPT + 99 others); Thu, 29 Apr 2021 12:00:55 -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.