diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2010-03-02 06:58:58 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2010-03-02 06:58:58 +0000 |
commit | e7228204343ac61d2316e74891e3606361a23f6e (patch) | |
tree | f83c2f2fdc768503cc062e89b74034f42a21dc98 /sys/net/zlib.h | |
parent | 24179b01409038c958cdeb06e602d9878d06db1b (diff) | |
download | src-e7228204343ac61d2316e74891e3606361a23f6e.tar.gz src-e7228204343ac61d2316e74891e3606361a23f6e.zip |
Merge projects/enhanced_coredumps (r204346) into HEAD:
Enhanced process coredump routines.
This brings in the following features:
1) Limit number of cores per process via the %I coredump formatter.
Example:
if corefilename is set to %N.%I.core AND num_cores = 3, then
if a process "rpd" cores, then the corefile will be named
"rpd.0.core", however if it cores again, then the kernel will
generate "rpd.1.core" until we hit the limit of "num_cores".
this is useful to get several corefiles, but also prevent filling
the machine with corefiles.
2) Encode machine hostname in core dump name via %H.
3) Compress coredumps, useful for embedded platforms with limited space.
A sysctl kern.compress_user_cores is made available if turned on.
To enable compressed coredumps, the following config options need to be set:
options COMPRESS_USER_CORES
device zlib # brings in the zlib requirements.
device gzio # brings in the kernel vnode gzip output module.
4) Eventhandlers are fired to indicate coredumps in progress.
5) The imgact sv_coredump routine has grown a flag to pass in more
state, currently this is used only for passing a flag down to compress
the coredump or not.
Note that the gzio facility can be used for generic output of gzip'd
streams via vnodes.
Obtained from: Juniper Networks
Reviewed by: kan
Notes
Notes:
svn path=/head/; revision=204552
Diffstat (limited to 'sys/net/zlib.h')
-rw-r--r-- | sys/net/zlib.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/net/zlib.h b/sys/net/zlib.h index 9529e43b8be7..85db8d405c68 100644 --- a/sys/net/zlib.h +++ b/sys/net/zlib.h @@ -1010,6 +1010,13 @@ extern int EXPORT inflateInit2_ OF((z_streamp strm, int windowBits, uLongf *get_crc_table OF((void)); /* can be used by asm versions of crc32() */ +#ifdef _KERNEL +struct vnode; +extern gzFile gz_open OF((const char *path, const char *mode, + struct vnode *vp)); +#endif + + #ifdef __cplusplus } #endif |