FreeBSD/contrib/openbsm/libauditd/auditd_lib.c
/*
 * Get the min percentage of free blocks from audit_control(5) and that
 * value in the kernel.  Return:
 *	ADE_NOERR	on success,
 *	ADE_PARSE	error parsing audit_control(5),
 *	ADE_AUDITON	error getting/setting auditon(2) value.
 */
Get the min percentage of free blocks from audit_control(5) and that
value in the kernel.
Get the min percentage of free blocks from audit_control ( 5 ) and that value in the kernel .
int
auditd_set_minfree(void)
{
	au_qctrl_t qctrl;
	if (getacmin(&auditd_minval) != 0)
		return (ADE_PARSE);
	if (audit_get_qctrl(&qctrl, sizeof(qctrl)) != 0)
		return (ADE_AUDITON);
	if (qctrl.aq_minfree != auditd_minval) {
		qctrl.aq_minfree = auditd_minval;
		if (audit_set_qctrl(&qctrl, sizeof(qctrl)) != 0)
			return (ADE_AUDITON);
	}
	return (0);
}
int auditd_set_minfree ( void ) { au_qctrl_t qctrl ; if ( getacmin ( & auditd_minval ) != 0 ) return ( ADE_PARSE ) ; if ( audit_get_qctrl ( & qctrl , sizeof ( qctrl ) ) != 0 ) return ( ADE_AUDITON ) ; if ( qctrl . aq_minfree != auditd_minval ) { qctrl . aq_minfree = auditd_minval ; if ( audit_set_qctrl ( & qctrl , sizeof ( qctrl ) ) != 0 ) return ( ADE_AUDITON ) ; } return ( 0 ) ; }
Get the min percentage of free blocks from audit_control(5) and that
 value in the kernel.
Get the min percentage of free blocks from audit_control ( 5 ) and that value in the kernel .