diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-05 17:50:15 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 00:16:23 -0500 |
commit | aa3e7eaf0a0f06edd2b733e84e7e8ffe108e8786 (patch) | |
tree | a4adeb88d0b1ae710a4113e55db7064895a3e70d /arch/x86/um/elfcore.c | |
parent | 506f21c556c747bb07b893f146220ec45cda381b (diff) |
switch elf_core_write_extra_data() 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.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/um/elfcore.c b/arch/x86/um/elfcore.c index fc21f98efafe..7bb89a27a5e4 100644 --- a/arch/x86/um/elfcore.c +++ b/arch/x86/um/elfcore.c | |||
@@ -38,8 +38,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset) | |||
38 | return 1; | 38 | return 1; |
39 | } | 39 | } |
40 | 40 | ||
41 | int elf_core_write_extra_data(struct file *file, size_t *size, | 41 | int elf_core_write_extra_data(struct coredump_params *cprm) |
42 | unsigned long limit) | ||
43 | { | 42 | { |
44 | if ( vsyscall_ehdr ) { | 43 | if ( vsyscall_ehdr ) { |
45 | const struct elfhdr *const ehdrp = | 44 | const struct elfhdr *const ehdrp = |
@@ -52,10 +51,7 @@ int elf_core_write_extra_data(struct file *file, size_t *size, | |||
52 | if (phdrp[i].p_type == PT_LOAD) { | 51 | if (phdrp[i].p_type == PT_LOAD) { |
53 | void *addr = (void *) phdrp[i].p_vaddr; | 52 | void *addr = (void *) phdrp[i].p_vaddr; |
54 | size_t filesz = phdrp[i].p_filesz; | 53 | size_t filesz = phdrp[i].p_filesz; |
55 | 54 | if (!dump_emit(cprm, addr, filesz)) | |
56 | *size += filesz; | ||
57 | if (*size > limit | ||
58 | || !dump_write(file, addr, filesz)) | ||
59 | return 0; | 55 | return 0; |
60 | } | 56 | } |
61 | } | 57 | } |