]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Convert HAVE_AUDIT to WITH_AUDIT
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 20 Sep 2012 12:00:09 +0000 (13:00 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Jan 2013 11:03:23 +0000 (11:03 +0000)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
configure.ac
src/util/viraudit.c

index ffe0f66e394f3fd40607e776d73753816cab1c60..e4778f906138e10dcf0b46f43145a44952170d36 100644 (file)
@@ -1258,13 +1258,13 @@ if test "$with_audit" != "no" ; then
 
   if test "$with_audit" = "yes" ; then
     AUDIT_LIBS="$AUDIT_LIBS -laudit"
-    AC_DEFINE_UNQUOTED([HAVE_AUDIT], 1, [whether libaudit is available])
+    AC_DEFINE_UNQUOTED([WITH_AUDIT], 1, [whether libaudit is available])
   fi
 
   CFLAGS="$old_cflags"
   LIBS="$old_libs"
 fi
-AM_CONDITIONAL([HAVE_AUDIT], [test "$with_audit" = "yes"])
+AM_CONDITIONAL([WITH_AUDIT], [test "$with_audit" = "yes"])
 AC_SUBST([AUDIT_CFLAGS])
 AC_SUBST([AUDIT_LIBS])
 
index 04ac323e296c37981265068e7135e4836d762014..0f4bb4f4a8a3014e0f9c05d7210ebfa5631d224b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <config.h>
 
-#ifdef HAVE_AUDIT
+#ifdef WITH_AUDIT
 # include <libaudit.h>
 #endif
 #include <stdio.h>
 
 #define VIR_FROM_THIS VIR_FROM_AUDIT
 
-#if HAVE_AUDIT
+#if WITH_AUDIT
 static int auditfd = -1;
 #endif
 static int auditlog = 0;
 
 int virAuditOpen(void)
 {
-#if HAVE_AUDIT
+#if WITH_AUDIT
     if ((auditfd = audit_open()) < 0) {
         virReportSystemError(errno, "%s", _("Unable to initialize audit layer"));
         return -1;
@@ -87,7 +87,7 @@ void virAuditSend(const char *filename,
 
     /* Duplicate later checks, to short circuit & avoid printf overhead
      * when nothing is enabled */
-#if HAVE_AUDIT
+#if WITH_AUDIT
     if (!auditlog && auditfd < 0)
         return;
 #else
@@ -113,7 +113,7 @@ void virAuditSend(const char *filename,
                           NULL, "success=no %s", str);
     }
 
-#if HAVE_AUDIT
+#if WITH_AUDIT
     if (auditfd < 0) {
         VIR_FREE(str);
         return;
@@ -141,14 +141,14 @@ void virAuditSend(const char *filename,
 
 void virAuditClose(void)
 {
-#if HAVE_AUDIT
+#if WITH_AUDIT
     VIR_FORCE_CLOSE(auditfd);
 #endif
 }
 
 char *virAuditEncode(const char *key, const char *value)
 {
-#if HAVE_AUDIT
+#if WITH_AUDIT
     return audit_encode_nv_string(key, value, 0);
 #else
     char *str;