s3:registry: extract reg_eventlog prototypes to header of their own
authorMichael Adam <obnox@samba.org>
Mon, 24 May 2010 21:06:27 +0000 (23:06 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 25 May 2010 08:35:26 +0000 (10:35 +0200)
and use them only where needed.

source3/include/registry.h
source3/registry/reg_eventlog.c
source3/registry/reg_eventlog.h [new file with mode: 0644]
source3/registry/reg_init_full.c
source3/utils/eventlogadm.c

index 3496f13c49fc9ebb44f53312cbea9d93c3a7d32e..0914ba5486674dd96d081185b72bedd7289f415c 100644 (file)
@@ -56,12 +56,6 @@ WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
 WERROR reg_delete_path(const struct nt_user_token *token,
                       const char *orig_path);
 
-/* The following definitions come from registry/reg_eventlog.c  */
-
-bool eventlog_init_keys(void);
-bool eventlog_add_source( const char *eventlog, const char *sourcename,
-                         const char *messagefile );
-
 /* The following definitions come from registry/reg_init_basic.c  */
 
 WERROR registry_init_common(void);
index 43b6bb8968d01f103d904f2c6a37fbc97ed99273..b2bf69fa51758f450674ca919bf39d8e8d6acc96 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "registry.h"
 #include "reg_backend_db.h"
+#include "reg_eventlog.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_eventlog.h b/source3/registry/reg_eventlog.h
new file mode 100644 (file)
index 0000000..69f2f99
--- /dev/null
@@ -0,0 +1,29 @@
+/* 
+ *  Unix SMB/CIFS implementation.
+ *  Virtual Windows Registry Layer
+ *  Copyright (C) Marcin Krzysztof Porwit    2005,
+ *  Copyright (C) Brian Moran                2005.
+ *  Copyright (C) Gerald (Jerry) Carter      2005.
+ *  
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _REG_EVENTLOG_H
+#define _REG_EVENTLOG_H
+
+bool eventlog_init_keys(void);
+bool eventlog_add_source( const char *eventlog, const char *sourcename,
+                         const char *messagefile );
+
+#endif /* _REG_EVENTLOG_H */
index a3604e6c3875fbeb6ded5528f85245c3f165064d..265fed30ca51e9607c48cba4b65ee224a436b17d 100644 (file)
@@ -25,6 +25,7 @@
 #include "reg_cachehook.h"
 #include "reg_backend_db.h"
 #include "reg_perfcount.h"
+#include "reg_eventlog.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 7dbcf7d3713097b1118170c6dfe0b134d49b4b7f..15b8d207a2aa5ad951857697f9ac11b87365f693 100644 (file)
@@ -26,6 +26,7 @@
 #include "lib/eventlog/eventlog.h"
 #include "registry.h"
 #include "registry/reg_backend_db.h"
+#include "registry/reg_eventlog.h"
 
 #undef  DBGC_CLASS
 #define DBGC_CLASS DBGC_UTIL_EVENTLOG