1 #ifndef _LINUX_COREDUMP_H
2 #define _LINUX_COREDUMP_H
4 #include <linux/types.h>
9 * These are the only things you should do on a core-file: use only these
10 * functions to write out all the necessary info.
12 static inline int dump_write(struct file
*file
, const void *addr
, int nr
)
14 return file
->f_op
->write(file
, addr
, nr
, &file
->f_pos
) == nr
;
17 static inline int dump_seek(struct file
*file
, loff_t off
)
19 if (file
->f_op
->llseek
&& file
->f_op
->llseek
!= no_llseek
) {
20 if (file
->f_op
->llseek(file
, off
, SEEK_CUR
) < 0)
23 char *buf
= (char *)get_zeroed_page(GFP_KERNEL
);
28 unsigned long n
= off
;
32 if (!dump_write(file
, buf
, n
))
36 free_page((unsigned long)buf
);
41 #endif /* _LINUX_COREDUMP_H */
This page took 0.048422 seconds and 6 git commands to generate.