| #ifndef _LINUX_COREDUMP_H |
| #define _LINUX_COREDUMP_H |
| * These are the only things you should do on a core-file: use only these |
| * functions to write out all the necessary info. |
| static inline int dump_write(struct file *file, const void *addr, int nr) |
| return file->f_op->write(file, addr, nr, &file->f_pos) == nr; |
| static inline int dump_seek(struct file *file, loff_t off) |
| if (file->f_op->llseek && file->f_op->llseek != no_llseek) { |
| if (file->f_op->llseek(file, off, SEEK_CUR) < 0) |
| char *buf = (char *)get_zeroed_page(GFP_KERNEL); |
| if (!dump_write(file, buf, n)) { |
| free_page((unsigned long)buf); |
| #endif /* _LINUX_COREDUMP_H */ |