FreeBSD/sys/ddb/db_capture.c
/*
 * Routines for capturing DDB output into a fixed-size buffer.  These are
 * invoked from DDB's input and output routines.  If we hit the limit on the
 * buffer, we simply drop further data.
 */
Routines for capturing DDB output into a fixed-size buffer.  These are
invoked from DDB's input and output routines.  If we hit the limit on the
buffer, we simply drop further data.
Routines for capturing DDB output into a fixed - size buffer . These are invoked from DDB ' s input and output routines . If we hit the limit on the buffer we simply drop further data .
void
db_capture_write(char *buffer, u_int buflen)
{
	u_int len;
	if (db_capture_inprogress == 0 || db_capture_inpager)
		return;
	len = min(buflen, db_capture_bufsize - db_capture_bufoff);
	bcopy(buffer, db_capture_buf + db_capture_bufoff, len);
	db_capture_bufoff += len;
	KASSERT(db_capture_bufoff <= db_capture_bufsize,
	    ("db_capture_write: bufoff > bufsize"));
}
void db_capture_write ( char * buffer , u_int buflen ) { u_int len ; if ( db_capture_inprogress == 0 || db_capture_inpager ) return ; len = min ( buflen , db_capture_bufsize - db_capture_bufoff ) ; bcopy ( buffer , db_capture_buf + db_capture_bufoff , len ) ; db_capture_bufoff += len ; KASSERT ( db_capture_bufoff <= db_capture_bufsize , ( " " ) ) ; }
Routines for capturing DDB output into a fixed-size buffer.
Routines for capturing DDB output into a fixed - size buffer .