[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/10] dump: Rename write_elf*_phdr_note to prepare_elf*_phdr_note
From: |
marcandre . lureau |
Subject: |
[PULL 08/10] dump: Rename write_elf*_phdr_note to prepare_elf*_phdr_note |
Date: |
Thu, 6 Oct 2022 19:34:27 +0400 |
From: Janosch Frank <frankja@linux.ibm.com>
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 <frankja@linux.ibm.com>
Reviewed-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
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, MemoryMapping
*memory_mapping,
}
}
-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 = 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);
}
-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 = cpu_to_dump32(s, PT_NOTE);
@@ -364,11 +364,11 @@ static void write_elf_phdr_note(DumpState *s, Error
**errp)
int ret;
if (dump_is_64bit(s)) {
- write_elf64_phdr_note(s, &phdr64);
+ prepare_elf64_phdr_note(s, &phdr64);
size = sizeof(phdr64);
phdr = &phdr64;
} else {
- write_elf32_phdr_note(s, &phdr32);
+ prepare_elf32_phdr_note(s, &phdr32);
size = sizeof(phdr32);
phdr = &phdr32;
}
--
2.37.3
- [PULL 00/10] Dump patches, marcandre . lureau, 2022/10/06
- [PULL 01/10] dump: Replace opaque DumpState pointer with a typed one, marcandre . lureau, 2022/10/06
- [PULL 03/10] dump: Refactor dump_iterate and introduce dump_filter_memblock_*(), marcandre . lureau, 2022/10/06
- [PULL 02/10] dump: Rename write_elf_loads to write_elf_phdr_loads, marcandre . lureau, 2022/10/06
- [PULL 04/10] dump: Rework get_start_block, marcandre . lureau, 2022/10/06
- [PULL 05/10] dump: Rework filter area variables, marcandre . lureau, 2022/10/06
- [PULL 07/10] dump: Split elf header functions into prepare and write, marcandre . lureau, 2022/10/06
- [PULL 08/10] dump: Rename write_elf*_phdr_note to prepare_elf*_phdr_note,
marcandre . lureau <=
- [PULL 09/10] dump: simplify a bit kdump get_next_page(), marcandre . lureau, 2022/10/06
- [PULL 06/10] dump: Rework dump_calculate_size function, marcandre . lureau, 2022/10/06
- [PULL 10/10] dump: fix kdump to work over non-aligned blocks, marcandre . lureau, 2022/10/06
- Re: [PULL 00/10] Dump patches, Stefan Hajnoczi, 2022/10/11