FreeBSD/sys/kern/kern_shutdown.c
/* Call dumper with bounds checking. */
Call dumper with bounds checking.
Call dumper with bounds checking .
int
dump_write_pad(struct dumperinfo *di, void *virtual, vm_offset_t physical,
    off_t offset, size_t length, size_t *size)
{
	char *temp;
	int ret;
	if (length > di->blocksize)
		return (ENOMEM);
	*size = di->blocksize;
	if (length == di->blocksize)
		temp = virtual;
	else {
		temp = di->blockbuf;
		memset(temp + length, 0, di->blocksize - length);
		memcpy(temp, virtual, length);
	}
	ret = dump_write(di, temp, physical, offset, *size);
	return (ret);
}
int dump_write_pad ( struct dumperinfo * di , void * virtual , vm_offset_t physical , off_t offset , size_t length , size_t * size ) { char * temp ; int ret ; if ( length > di -> blocksize ) return ( ENOMEM ) ; * size = di -> blocksize ; if ( length == di -> blocksize ) temp = virtual ; else { temp = di -> blockbuf ; memset ( temp + length , 0 , di -> blocksize - length ) ; memcpy ( temp , virtual , length ) ; } ret = dump_write ( di , temp , physical , offset , * size ) ; return ( ret ) ; }
Call dumper with bounds checking.
Call dumper with bounds checking .