FreeBSD/sys/kern/imgact_elf.c
/*
 * Write out a core segment to the compression stream.
 */
Write out a core segment to the compression stream.
Write out a core segment to the compression stream .
static int
compress_chunk(struct coredump_params *p, char *base, char *buf, u_int len)
{
	u_int chunk_len;
	int error;
	while (len > 0) {
		chunk_len = MIN(len, CORE_BUF_SIZE);
		copyin(base, buf, chunk_len);
		error = gzio_write(p->gzs, buf, chunk_len);
		if (error != 0)
			break;
		base += chunk_len;
		len -= chunk_len;
	}
	return (error);
}
static int compress_chunk ( struct coredump_params * p , char * base , char * buf , u_int len ) { u_int chunk_len ; int error ; while ( len > 0 ) { chunk_len = MIN ( len , CORE_BUF_SIZE ) ; copyin ( base , buf , chunk_len ) ; error = gzio_write ( p -> gzs , buf , chunk_len ) ; if ( error != 0 ) break ; base += chunk_len ; len -= chunk_len ; } return ( error ) ; }
Write out a core segment to the compression stream.
Write out a core segment to the compression stream .