summaryrefslogtreecommitdiffstats
path: root/dump/dump.c
diff options
context:
space:
mode:
authorJanosch Frank2022-08-11 14:11:01 +0200
committerMarc-André Lureau2022-10-06 17:30:43 +0200
commit2341a94d3a0a8a93a5a977e642da1807b8edaab8 (patch)
tree713521075f30883894ebaeb490ca3ba76bc3df86 /dump/dump.c
parentdump: Split elf header functions into prepare and write (diff)
downloadqemu-2341a94d3a0a8a93a5a977e642da1807b8edaab8.tar.gz
qemu-2341a94d3a0a8a93a5a977e642da1807b8edaab8.tar.xz
qemu-2341a94d3a0a8a93a5a977e642da1807b8edaab8.zip
dump: Rename write_elf*_phdr_note to prepare_elf*_phdr_note
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>
Diffstat (limited to 'dump/dump.c')
-rw-r--r--dump/dump.c8
1 files 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;
}