From owner-trustedbsd-cvs@FreeBSD.ORG Wed Aug 23 06:20:23 2006 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D208C16A55D for ; Wed, 23 Aug 2006 06:20:23 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D4B343D46 for ; Wed, 23 Aug 2006 06:20:23 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by cyrus.watson.org (Postfix) with ESMTP id A6AA946BE4 for ; Wed, 23 Aug 2006 02:20:22 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 3C20955E4E; Wed, 23 Aug 2006 06:20:22 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 34EA116A4E2; Wed, 23 Aug 2006 06:20:22 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BCFE16A4E0 for ; Wed, 23 Aug 2006 06:20:22 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE47943D46 for ; Wed, 23 Aug 2006 06:20:21 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7N6KL3w007776 for ; Wed, 23 Aug 2006 06:20:21 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7N6KLLT007773 for perforce@freebsd.org; Wed, 23 Aug 2006 06:20:21 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 23 Aug 2006 06:20:21 GMT Message-Id: <200608230620.k7N6KLLT007773@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 104830 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2006 06:20:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=104830 Change 104830 by rwatson@rwatson_sesame on 2006/08/23 06:19:34 Rename two internal variables to be audit_ instead of bsm_. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#28 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#28 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#27 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#28 $ */ #include @@ -54,14 +54,14 @@ static au_record_t *open_desc_table[MAX_AUDIT_RECORDS]; /* The current number of active record descriptors */ -static int bsm_rec_count = 0; +static int audit_rec_count = 0; /* * Records that can be recycled are maintained in the list given below. The * maximum number of elements that can be present in this list is bounded by * MAX_AUDIT_RECORDS. Memory allocated for these records are never freed. */ -static LIST_HEAD(, au_record) bsm_free_q; +static LIST_HEAD(, au_record) audit_free_q; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; @@ -93,15 +93,15 @@ pthread_mutex_lock(&mutex); - if (bsm_rec_count == 0) - LIST_INIT(&bsm_free_q); + if (audit_rec_count == 0) + LIST_INIT(&audit_free_q); /* * Find an unused descriptor, remove it from the free list, mark as * used. */ - if (!LIST_EMPTY(&bsm_free_q)) { - rec = LIST_FIRST(&bsm_free_q); + if (!LIST_EMPTY(&audit_free_q)) { + rec = LIST_FIRST(&audit_free_q); rec->used = 1; LIST_REMOVE(rec, au_rec_q); } @@ -125,7 +125,7 @@ pthread_mutex_lock(&mutex); - if (bsm_rec_count == MAX_AUDIT_RECORDS) { + if (audit_rec_count == MAX_AUDIT_RECORDS) { pthread_mutex_unlock(&mutex); free(rec->data); free(rec); @@ -134,9 +134,9 @@ errno = ENOMEM; return (-1); } - rec->desc = bsm_rec_count; - open_desc_table[bsm_rec_count] = rec; - bsm_rec_count++; + rec->desc = audit_rec_count; + open_desc_table[audit_rec_count] = rec; + audit_rec_count++; pthread_mutex_unlock(&mutex); @@ -257,7 +257,7 @@ pthread_mutex_lock(&mutex); /* Add the record to the freelist tail */ - LIST_INSERT_HEAD(&bsm_free_q, rec, au_rec_q); + LIST_INSERT_HEAD(&audit_free_q, rec, au_rec_q); pthread_mutex_unlock(&mutex); }