From patchwork Wed May 13 18:09:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186687 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp686818ilb; Wed, 13 May 2020 11:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyen+y1dB7RH8OR931xs06PbGk4JOtSPK/WmfbV5wzByAycWQEptY/MIcNak/LXwf/c0Rtu X-Received: by 2002:a05:620a:1479:: with SMTP id j25mr1043058qkl.110.1589393698186; Wed, 13 May 2020 11:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589393698; cv=none; d=google.com; s=arc-20160816; b=Txbh0KznyevoJfJuq3Y1wnVjAqmDmx6ZqLahMU8S/7V3QXCSzLEypgKucld7Ls8MiV soRZYi1pyGwg+kxbO1Bb8gX/w3HEC/2LzF/xK88d3lywL5ONROjWWo4vjiY+0vRC9lWq gbNlNqOiid6jptI2ellNxsFSOQrFB/aNt0V/ADc3RMzl8Aq5y1MxNEuQNtxCgfN9IYC/ FGYOl4xKJ/SIoEP9dnT+WKoAGXIwbL8WcFIM8VBr2QSwsi5hNQDG3LEmXCSnzXeFwiOl eZxFSBwRWewVUscEBbtNXrCO7OzENyR1TaVkhX1/YOo0jXmuJncZHpW6yK1YPxLotZyn LyWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=lLvKLW9QkwF6CYlMcG5jB8i9eNtam9qfgfh7941aYEI=; b=RpX4F5N3UwKXae5kECQO24uTaWNOSaXtuLFlKTdeKLCxNwZ2vbVWmLIBSxhDXR8Nz6 W7tqkFh/tye/BX3cvdoa/nq0r4ZZGQj2/XK/NEdW0f6lB8vcB++dO/B7XKOUNcfzx9fz H5RTkZ4Yu2eeTzUqZR/sJYlQS0sXLEmJnoEq/mq7/tlZLLvRGHSfnYZT46GDeo1Z3VYk wakdMkEsdovDPUCRtKqQCECsimrKZEqcSR2nafcg85jLvN35iIjwsX55Y/LArmL7Bu0O dTgw2yfd1QmUYTO9UVKxTpc/Q+ZdXEJEKTicxy7Y8OKkxwyBbd1bJEDJp7bxfCbpDfWD 9lOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qBexN1V5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s53si302022qtb.71.2020.05.13.11.14.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 May 2020 11:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qBexN1V5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvuD-0002Fm-LN for patch@linaro.org; Wed, 13 May 2020 14:14:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvpW-0003og-IF for qemu-devel@nongnu.org; Wed, 13 May 2020 14:10:08 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:40029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvpT-0000ME-5z for qemu-devel@nongnu.org; Wed, 13 May 2020 14:10:03 -0400 Received: by mail-pl1-x644.google.com with SMTP id t16so141199plo.7 for ; Wed, 13 May 2020 11:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lLvKLW9QkwF6CYlMcG5jB8i9eNtam9qfgfh7941aYEI=; b=qBexN1V5iAhi/Y3W2qYSdY2X2j5MqvO+VRrkXN+YKGMef35whPusMsSCg4I515AoAK ciN8FpFypbDlMvXFJV6hHr0WIBCNb1GNnXd1jFmsSXP2q1bQaoj9h7cr3g0PqGX1P6Om Vf16XHf2JvH6uq9pnIS0KFREPjpbRqRkfGYeWNoqXx6Xn2cdM/UuJMm41yAjIXTk+56H 8PabMse08+IKcxaT1BYeHY320jtPej62P88f98HKzT3zxyQMqIBhv7ClmuiP5h/zVGtC hBsj9ErF9pUKzcptWwKHFkLZwHG0nno4GIlxy5NK3fjIabnZIpHvFDbL4WbmdgJU5H7t kT+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lLvKLW9QkwF6CYlMcG5jB8i9eNtam9qfgfh7941aYEI=; b=W1HXQmS9nMl62zP7tH2//Gh763L/47NpmTzo65qtpnPzoLxTvpq3AY3MxoOrfE9JwQ GyYPEYO6FEQeWGSJ662ZZn/UMKTOOoe79bANHRdyhb3iS5+hPDrMq4tN/V+pD9mlcb9k SOU6eMMWucECFOItZEwaY7o8VPCwGQlgOjledeE60Vt0mQF30CJlt/BcHKBa/OaxBokL yzOE+yjTVJoc2R9ACcq7vlX6d2TKU+7t9d7h3+pjibVhYsom/AbzKAvaXH/yGzw3aQDi C+cvjcpl1kHUdJwPmb32LDsZS+kUe697IvRjPCI8E5GrBUWDcwb2TsYj/eHYyatyNnD8 n9iw== X-Gm-Message-State: AGi0PuZGZsg9P8RX+kzL5Fj8JambCpXW4+QiXxVynrUF/19n+DboaOXk dTSr1nCl5fvxwj31jVRr+HTlHGXesvQ= X-Received: by 2002:a17:90a:204b:: with SMTP id n69mr35084488pjc.176.1589393400875; Wed, 13 May 2020 11:10:00 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id i185sm197361pfg.14.2020.05.13.11.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 11:10:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [RISU 4/9] Adjust tracefile open for write Date: Wed, 13 May 2020 11:09:48 -0700 Message-Id: <20200513180953.20376-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513180953.20376-1-richard.henderson@linaro.org> References: <20200513180953.20376-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Truncate the new output file. Rely on umask to remove group+other file permissions, if desired. Signed-off-by: Richard Henderson --- risu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Peter Maydell diff --git a/risu.c b/risu.c index 1c66885..f404d8f 100644 --- a/risu.c +++ b/risu.c @@ -368,7 +368,7 @@ int main(int argc, char **argv) comm_fd = ismaster ? STDOUT_FILENO : STDIN_FILENO; } else { if (ismaster) { - comm_fd = open(trace_fn, O_WRONLY | O_CREAT, S_IRWXU); + comm_fd = open(trace_fn, O_WRONLY | O_CREAT | O_TRUNC, 0666); } else { comm_fd = open(trace_fn, O_RDONLY); }