Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2006 06:20:21 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 104830 for review
Message-ID:  <200608230620.k7N6KLLT007773@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/types.h>
@@ -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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608230620.k7N6KLLT007773>