From patchwork Fri Jul 8 15:46:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 588567 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp813108mab; Fri, 8 Jul 2022 09:28:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twlhGnu1E3v34uzd2nl/FgyvpNab4SvsASq+8whkGK/e/EaIWxN45Ahb58sp8/LpEjDWbf X-Received: by 2002:a05:620a:4150:b0:6b1:4472:6a82 with SMTP id k16-20020a05620a415000b006b144726a82mr2918014qko.696.1657297693593; Fri, 08 Jul 2022 09:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657297693; cv=none; d=google.com; s=arc-20160816; b=OWImpVsCFzNCHMOvZG1Cx5IdwGJoTmkG8uX7JwicZL3mlmDpZhw5U97fyHDGhCGqE1 2V6Lxnv6j2kzJuLNxn3SvnU8qosS6H+lZmD2ZoNFjIFVTgtSRP887KtOY+oPWuuCzQ5Q MK73ZyRqcLRs78yFasXvcKrqtaoYK3y0j/TvM+al8+QY5D1D1K7rZ/xiiKyWkXrMSs1s ncRRQjJrynofHL5jP5kq97JclSjjTkvKQI5Nhq3c1LeQVs8uQUoCAX/Go84HL6xuAUrg Hsed6Rb3btOP/NK6xPaVTq0KO/reGrZjab8d/SvMmHb9E9zqatUR4hM7wIyht1NDCvWg PMnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=opEz47JE2jF71CZWR53DtauRYpdQpOBqzfW1h3P7OCY=; b=WzpF5lPXKI6UfFPLvMjk73Xd6kYpzNsUGcMSGEDbevUEDi09kf4uSR66ARnloa8Fzz 7dFTQ9Nitu4HRA/9fMr6Rvc31wjGeUqy/CW1Yy+ubRBjgwGzOi6Olgjh/UZeOKA9yJhk mVn0jkruPn/b+ucEmbQucr5o+Xe5eXf5QJ/8ejM1Nh3NugMJ/txJriVc7PLtxOwdwm+4 KnA8mcftUhole1xVecLdgStAvyty9xK+2R7FnZYLhXnyP99HfDB5TXFu6yvlQ8RecE1G 4EL0GkraV0S6kYrobs7AM7kny3/hl0fAEBTyyJ/DiZgPqenHSZAmXXG3essjPYjmynt5 mqwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uzmrF8gV; 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 q23-20020a37f717000000b006ab961fa964si7951000qkj.390.2022.07.08.09.28.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jul 2022 09:28:13 -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=uzmrF8gV; 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]:52992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9qpw-0000UM-Nr for patch@linaro.org; Fri, 08 Jul 2022 12:28:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9qCP-0004Is-JR for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:47:22 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:38450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9qCO-0002Mw-1W for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:47:21 -0400 Received: by mail-pl1-x632.google.com with SMTP id m14so16675721plg.5 for ; Fri, 08 Jul 2022 08:47:19 -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=opEz47JE2jF71CZWR53DtauRYpdQpOBqzfW1h3P7OCY=; b=uzmrF8gVa/Q/F0vYfgs0h1pR8CtiCJAtSDfJEFH9PcSvREy69QAgJycgleaiZUzlmn 7tvhoPKKVRA7LxK/BtnhlUyPcfRougztvfCgRNV/wVaYAYVxS4j4ybQlQDE4V1fdlLs6 M5okr4wH0dJv8g15Zv0GQtIbTL91AcguCF51he06vNRVIS6jkJPHZLQnlJqQXhR3gukz J/hKH267tbhqnNeoHNzq4YhPGxVkch0Vyxh+2lQ4gEAZTVReVsiTCQ77Keyu6yc1KS5r lTKb9ic3dea3UO6WHYQcz7MviMKbsRVd3o+4VHyXCsp8c0bUmzJJtT9cTIftuYzOK/mA lmEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=opEz47JE2jF71CZWR53DtauRYpdQpOBqzfW1h3P7OCY=; b=FYU3J6TkgMsQdZKZTO+AIxOsoWc/8lZeyGDgHDgoEOFYfet5TdhckqUCsdWDnVlIXD wbDFTgYrxykG7ZVqcw9QEpEHCQXOoBpoZkPT1gMq2fdoWS3vw6xNOdJK4EpL5buOuw/Y Ux4Q06SjzFpYPefqze+CcuJBPy4tDk8ztWIbk17zebm9oS5ldb2K8bX5fUOOy71saJRj SFu8XsRo9n5FVmiGCXPokDZfOxIE1agKebyzFeaQcFag5JSfHOeh2n+hSC1YIfx13CZo CC8U1NtTYRTD20DvIrY+E8EUx/ScfcycXNWCiPMvWultddBj4mbfwPI9hiP0JX5GoDky dYHg== X-Gm-Message-State: AJIora8JLkuCsY5+C4HJZZVoHugityQeXTF73ogdk9A/3rBDro8zcY9o gDFxs7WEzdP7YOXBuCHqDLmzZ6MacWYE9SPa X-Received: by 2002:a17:902:ea09:b0:16b:a264:381f with SMTP id s9-20020a170902ea0900b0016ba264381fmr4256745plg.150.1657295239294; Fri, 08 Jul 2022 08:47:19 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id y3-20020a17090a390300b001ef81bac701sm1782089pjb.42.2022.07.08.08.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 08:47:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell Subject: [RISU PATCH v4 04/29] Adjust tracefile open for write Date: Fri, 8 Jul 2022 21:16:35 +0530 Message-Id: <20220708154700.18682-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708154700.18682-1-richard.henderson@linaro.org> References: <20220708154700.18682-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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(-) 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); }