FreeBSD/sys/security/audit/audit_pipe.c
/*
 * Return true if there are records available for reading on the pipe.
 */
Return true if there are records available for reading on the pipe.
Return true if there are records available for reading on the pipe .
static int
audit_pipe_kqread(struct knote *kn, long hint)
{
	struct audit_pipe *ap;
	ap = (struct audit_pipe *)kn->kn_hook;
	AUDIT_PIPE_LOCK_ASSERT(ap);
	if (ap->ap_qlen != 0) {
		kn->kn_data = ap->ap_qbyteslen - ap->ap_qoffset;
		return (1);
	} else {
		kn->kn_data = 0;
		return (0);
	}
}
static int audit_pipe_kqread ( struct knote * kn , long hint ) { struct audit_pipe * ap ; ap = ( struct audit_pipe * ) kn -> kn_hook ; AUDIT_PIPE_LOCK_ASSERT ( ap ) ; if ( ap -> ap_qlen != 0 ) { kn -> kn_data = ap -> ap_qbyteslen - ap -> ap_qoffset ; return ( 1 ) ; } else { kn -> kn_data = 0 ; return ( 0 ) ; } }
Return true if there are records available for reading on the pipe.
Return true if there are records available for reading on the pipe .