aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um/elfcore.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-10-05 17:22:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:23 -0500
commit506f21c556c747bb07b893f146220ec45cda381b (patch)
tree314bda008996a302a73779d522c349eb174dc8b9 /arch/x86/um/elfcore.c
parentecc8c7725e6c21528329b34acae2a1d64b3af89b (diff)
switch elf_core_write_extra_phdrs() to dump_emit()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/um/elfcore.c')
-rw-r--r--arch/x86/um/elfcore.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/um/elfcore.c b/arch/x86/um/elfcore.c
index 6bb49b687c97..fc21f98efafe 100644
--- a/arch/x86/um/elfcore.c
+++ b/arch/x86/um/elfcore.c
@@ -11,8 +11,7 @@ Elf32_Half elf_core_extra_phdrs(void)
11 return vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0; 11 return vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0;
12} 12}
13 13
14int elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size, 14int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
15 unsigned long limit)
16{ 15{
17 if ( vsyscall_ehdr ) { 16 if ( vsyscall_ehdr ) {
18 const struct elfhdr *const ehdrp = 17 const struct elfhdr *const ehdrp =
@@ -32,9 +31,7 @@ int elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size,
32 phdr.p_offset += ofs; 31 phdr.p_offset += ofs;
33 } 32 }
34 phdr.p_paddr = 0; /* match other core phdrs */ 33 phdr.p_paddr = 0; /* match other core phdrs */
35 *size += sizeof(phdr); 34 if (!dump_emit(cprm, &phdr, sizeof(phdr)))
36 if (*size > limit
37 || !dump_write(file, &phdr, sizeof(phdr)))
38 return 0; 35 return 0;
39 } 36 }
40 } 37 }