From nobody Tue Feb 10 05:45:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665075430; cv=none; d=zohomail.com; s=zohoarc; b=n0nMZp2aYJ6Agh3Z7CIALAR1rH+je3Elq9Mcjo2yN6ZkAtuheDS67cYctGxKsckSF8Fc8ETZjnGrG08NjHi2X38JM0ld7VrddI+DYuGFJ5OGZyUKYRDQSuekjN0Bt5NSaSa/0QzXuIyaxfnq30DFkpp4EWgw9GEEllaWLig36P0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665075430; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QODbEEu/ErPvK0BeyIXd5lDo4uskdjchNK/jc3WZeCQ=; b=Hb9pvAogNN4Uodtk8HGIcCVxN6YL6fL8OybkecUeUqqi8kUlGr6m6z3r4+WjCq5WxO+/9V4o9P7mJLPdZvOFbEjUgSaVxE/ea2yGIjVjq5xtSS5AdQdzCxmJ4/uU+5TX21XVNRFG3qOWWwPArMtF8V0Y0zDR7WAlkj87U/xNJfw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1665075430682209.7921735650326; Thu, 6 Oct 2022 09:57:10 -0700 (PDT) Received: from localhost ([::1]:52390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogUBJ-0008GH-NJ for importer@patchew.org; Thu, 06 Oct 2022 12:57:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogSuG-0003jU-2i for qemu-devel@nongnu.org; Thu, 06 Oct 2022 11:35:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogSuB-0000TS-WC for qemu-devel@nongnu.org; Thu, 06 Oct 2022 11:35:26 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-664-SrWhGXO_PtyefPEzFciL9w-1; Thu, 06 Oct 2022 11:35:17 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE77E29324A0; Thu, 6 Oct 2022 15:35:16 +0000 (UTC) Received: from localhost (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9B534EA5D; Thu, 6 Oct 2022 15:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665070521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QODbEEu/ErPvK0BeyIXd5lDo4uskdjchNK/jc3WZeCQ=; b=RAWQWbuZIZOjr+z979gs9gJ0f1lcwU/Krt5QXygmJ6mgYt7Ic7IZ/aSi/crbpr1rBUt0dS q/WUXG318D1bYwkCbE6Tgy1ZLjNfAOJShRk/XOy8kJQVeTVNOOwns1czW5EhIUjzRKrNdL djQcNS+wsyc3xnA6Jd/k+pJluzXHO5s= X-MC-Unique: SrWhGXO_PtyefPEzFciL9w-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Bin Meng , Daniel Henrique Barboza , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, Alistair Francis , qemu-riscv@nongnu.org, Peter Maydell , viktor.prutyanov@redhat.com, Greg Kurz , frankja@linux.ibm.com, David Hildenbrand , Palmer Dabbelt , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson , qemu-arm@nongnu.org, Cornelia Huck , Thomas Huth Subject: [PULL 08/10] dump: Rename write_elf*_phdr_note to prepare_elf*_phdr_note Date: Thu, 6 Oct 2022 19:34:27 +0400 Message-Id: <20221006153430.2775580-9-marcandre.lureau@redhat.com> In-Reply-To: <20221006153430.2775580-1-marcandre.lureau@redhat.com> References: <20221006153430.2775580-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665075431487100001 From: Janosch Frank The functions in question do not actually write to the file descriptor they set up a buffer which is later written to the fd. Signed-off-by: Janosch Frank Reviewed-by: Janis Schoetterl-Glausch Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220811121111.9878-9-frankja@linux.ibm.com> --- dump/dump.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 8a2a97a85e..a905316fe5 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -260,7 +260,7 @@ static void write_elf32_load(DumpState *s, MemoryMappin= g *memory_mapping, } } =20 -static void write_elf64_phdr_note(DumpState *s, Elf64_Phdr *phdr) +static void prepare_elf64_phdr_note(DumpState *s, Elf64_Phdr *phdr) { memset(phdr, 0, sizeof(*phdr)); phdr->p_type =3D cpu_to_dump32(s, PT_NOTE); @@ -316,7 +316,7 @@ static void write_elf64_notes(WriteCoreDumpFunction f, = DumpState *s, write_guest_note(f, s, errp); } =20 -static void write_elf32_phdr_note(DumpState *s, Elf32_Phdr *phdr) +static void prepare_elf32_phdr_note(DumpState *s, Elf32_Phdr *phdr) { memset(phdr, 0, sizeof(*phdr)); phdr->p_type =3D cpu_to_dump32(s, PT_NOTE); @@ -364,11 +364,11 @@ static void write_elf_phdr_note(DumpState *s, Error *= *errp) int ret; =20 if (dump_is_64bit(s)) { - write_elf64_phdr_note(s, &phdr64); + prepare_elf64_phdr_note(s, &phdr64); size =3D sizeof(phdr64); phdr =3D &phdr64; } else { - write_elf32_phdr_note(s, &phdr32); + prepare_elf32_phdr_note(s, &phdr32); size =3D sizeof(phdr32); phdr =3D &phdr32; } --=20 2.37.3