]> Pileus Git - ~andy/linux/blobdiff - arch/ia64/kernel/elfcore.c
switch elf_core_write_extra_phdrs() to dump_emit()
[~andy/linux] / arch / ia64 / kernel / elfcore.c
index bac1639bc3207acf97192e3300e6a961eca10fa7..798ce543da4b1bdf644ebe406c3a2df9b8d8b3c3 100644 (file)
@@ -11,8 +11,7 @@ Elf64_Half elf_core_extra_phdrs(void)
        return GATE_EHDR->e_phnum;
 }
 
-int elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size,
-                              unsigned long limit)
+int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
 {
        const struct elf_phdr *const gate_phdrs =
                (const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff);
@@ -35,8 +34,7 @@ int elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size,
                        phdr.p_offset += ofs;
                }
                phdr.p_paddr = 0; /* match other core phdrs */
-               *size += sizeof(phdr);
-               if (*size > limit || !dump_write(file, &phdr, sizeof(phdr)))
+               if (!dump_emit(cprm, &phdr, sizeof(phdr)))
                        return 0;
        }
        return 1;