FreeBSD/sys/ddb/db_capture.c
/*
 * Sysctl to read out the capture buffer from userspace.  We require
 * privilege as sensitive process/memory information may be accessed.
 */
Sysctl to read out the capture buffer from userspace.  We require
privilege as sensitive process/memory information may be accessed.
Sysctl to read out the capture buffer from userspace . We require privilege as sensitive process / memory information may be accessed .
static int
sysctl_debug_ddb_capture_data(SYSCTL_HANDLER_ARGS)
{
	int error;
	char ch;
	error = priv_check(req->td, PRIV_DDB_CAPTURE);
	if (error)
		return (error);
	sx_slock(&db_capture_sx);
	error = SYSCTL_OUT(req, db_capture_buf, db_capture_bufoff);
	sx_sunlock(&db_capture_sx);
	if (error)
		return (error);
	ch = '\0';
	return (SYSCTL_OUT(req, &ch, sizeof(ch)));
}
static int sysctl_debug_ddb_capture_data ( SYSCTL_HANDLER_ARGS ) { int error ; char ch ; error = priv_check ( req -> td , PRIV_DDB_CAPTURE ) ; if ( error ) return ( error ) ; sx_slock ( & db_capture_sx ) ; error = SYSCTL_OUT ( req , db_capture_buf , db_capture_bufoff ) ; sx_sunlock ( & db_capture_sx ) ; if ( error ) return ( error ) ; ch = ' \0 ' ; return ( SYSCTL_OUT ( req , & ch , sizeof ( ch ) ) ) ; }
Sysctl to read out the capture buffer from userspace.
Sysctl to read out the capture buffer from userspace .