From patchwork Fri May 22 02:34:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187116 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp2102603ilb; Thu, 21 May 2020 19:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkfd63+zaSN5ER1PR04g0X0FkdiUA+PB+LnCi+yNgsrOe5VLFfqJ59eKBnu/Ij6b8BBBYR X-Received: by 2002:a0c:8b99:: with SMTP id r25mr1614737qva.174.1590114952977; Thu, 21 May 2020 19:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590114952; cv=none; d=google.com; s=arc-20160816; b=tdcC9kf8KbwaXAzZ/Btx2gSrRs2fUZWWLJxmwGp/UwF3Rp5+66zzXkXSuUQo1IkbjI a8D7Ni8JH1w26IcDo5+4Aih6uAYPTUEagtgRYjU+wwgA+MRI7q83LjRIopjvm2ONP9tP iuuCjfCk6oD9UcLJuF528p/dg/78gcvS9ngO4r6+/MRM/Ez9Da7b+PC7C5h1pSgU5ojP NiXhN7AlROw8myE90yPB8ZQMJn32AotpvG6DvGBbI0NU4NaUEO/mi+qFMnxwft7ULRdl oxJUEwtD3GqChv9YuCDmjiYI4FTzg9dDoQYUMrZq4tTo2LrgKY0cSQXpJPJyK9eIvUH8 ZX+Q== 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=W1694WY6F055oZOFF3E5eWwK1wEHGNgMdmDWrbbBY/M=; b=MVh8CKaBmsdvUhBev1Jcd1ExQSxd97T3cAhCbNmIOqTGlMh3Vyq+TWvxa43E3kvoVr kkldc3ulwxORp7sqCB8dyWf0OJwnTxqqWmeotuGY1QYhdntJWbZfjehD+zF6BtSzZBOk Gg12jLeSKoDGY2C3qF08m0HrqzkNlBOlcEgtAgcKDKeJCbJxRO+k6pS+rCGn2KGiVFDu YgFvZh4pKMA44UM1GIjc0davFz/j+obthoV1Vti+TKi0/k8DG2Rsn0kWw5BImyxZHqCE OjYaLxXxWpxZb6UmrCkDOmz5HgK4mzyM42URv4pzbxxfwcxMrZ9trFurkDA39o49sjII b7HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GvVBlGh6; 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=fail (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 ba18si4503451qvb.150.2020.05.21.19.35.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 May 2020 19:35:52 -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=fail header.i=@linaro.org header.s=google header.b=GvVBlGh6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbxXM-0003SW-GZ for patch@linaro.org; Thu, 21 May 2020 22:35:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbxWL-00027p-DJ for qemu-devel@nongnu.org; Thu, 21 May 2020 22:34:49 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:36957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbxWK-000568-Ke for qemu-devel@nongnu.org; Thu, 21 May 2020 22:34:49 -0400 Received: by mail-pj1-x1042.google.com with SMTP id q9so4346379pjm.2 for ; Thu, 21 May 2020 19:34:48 -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=W1694WY6F055oZOFF3E5eWwK1wEHGNgMdmDWrbbBY/M=; b=GvVBlGh6GZizFuyYHFIE3scoCKsIg/+Pinta/2iI0hpCwVAF9BlsEPmj5d8y+HwmXh p+43R11cG018wFQpJQ2nqBTpazUwJ6xdWAFSInINFG5e7iQkS5T7ZVDoqKEVK5RPXh0e X56Z5V2jXhd4Cz/WRhM1SVBY9leX/FvuX3r8GSf15MJ7QyDGmFtPCK4KpwW93MupSv5V 5B/gxKYA2PvfJGcLVRbjvLiqdlup5ShM6FRS9yB2kSJr74G5VlCdRpxWmhAmJMyXwSwX lA2SH2VRv/V3RFD6LUxRlBOXCPSL3taoUWqEzTLcaoxQb0FUvywYhxLEmSXQKCsE0GWP F2Sw== 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=W1694WY6F055oZOFF3E5eWwK1wEHGNgMdmDWrbbBY/M=; b=p6Xxer9PH51JQfpQ49xw1BR6rVUK1kpS9h3bpp5d6eXNGwHE9nenGsiicGQN5hBfLP fWYFTcs7O0CjOAVNs5b1ii3m5E8yo7bhqpm19AyM1t7jCRUtVUFywJX0YlMNgjiRwAOo FfcGKKxU9GYQRni7WLKBIAugJ2kP4wEt7hU1XPqRDoa3e3Fts7pgO23PPkHmCsNQuS96 F6EKnKv9yyEXw3KL8K9FCqStBuMx222b4UoeamKTvG0COjf2Y1m9yKsZs+z3BiZsnbw+ tRYfEtCBKtRbmlhuLFST1Kl64SPZQhNXuwoF7faaSIUxS6RBirSZR4WBx78kLZmSNSaY k4fg== X-Gm-Message-State: AOAM531dIXZnAJCmnlHGq446a6qMJgL7iToMBNPvhafmIcCFkRK5MJW8 J8BD2sGWmttgleIhSf23HtrDt1HLjSU= X-Received: by 2002:a17:902:6bcb:: with SMTP id m11mr12262424plt.264.1590114886994; Thu, 21 May 2020 19:34:46 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id gt10sm5443755pjb.30.2020.05.21.19.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 19:34:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 04/25] Adjust tracefile open for write Date: Thu, 21 May 2020 19:34:19 -0700 Message-Id: <20200522023440.26261-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522023440.26261-1-richard.henderson@linaro.org> References: <20200522023440.26261-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1042.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 , 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. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- risu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/risu.c b/risu.c index 2f6a677..819b786 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); }