summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-23 16:11:13 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:25 +0200
commit4ae77b2ef9ef5f936055b03a7fb96231a069683b (patch)
treecc800e12f751a567786c2f28626271056fb6d147
parentc682fd65b20e6b17150b3a57bebb222767c60796 (diff)
downloadsamba-4ae77b2ef9ef5f936055b03a7fb96231a069683b.tar.gz
samba-4ae77b2ef9ef5f936055b03a7fb96231a069683b.tar.bz2
samba-4ae77b2ef9ef5f936055b03a7fb96231a069683b.zip
s3:registry: extract the reg_util prototypes into their own header.
And use them only where needed.
-rw-r--r--source3/include/registry.h8
-rw-r--r--source3/registry/reg_api.c1
-rw-r--r--source3/registry/reg_backend_current_version.c1
-rw-r--r--source3/registry/reg_backend_db.c1
-rw-r--r--source3/registry/reg_backend_perflib.c1
-rw-r--r--source3/registry/reg_backend_printing.c1
-rw-r--r--source3/registry/reg_util.c1
-rw-r--r--source3/registry/reg_util.h29
8 files changed, 35 insertions, 8 deletions
diff --git a/source3/include/registry.h b/source3/include/registry.h
index a4ecd26842..1cb0ea357f 100644
--- a/source3/include/registry.h
+++ b/source3/include/registry.h
@@ -127,14 +127,6 @@ uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
-/* The following definitions come from registry/reg_util.c */
-
-bool reg_split_path(char *path, char **base, char **new_path);
-bool reg_split_key(char *path, char **base, char **key);
-char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
-void normalize_dbkey(char *key);
-char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
-
/* The following definitions come from lib/util_reg_api.c */
WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 744428e80b..e08bdb523f 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -66,6 +66,7 @@
#include "registry.h"
#include "reg_cachehook.h"
#include "regfio.h"
+#include "reg_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_current_version.c b/source3/registry/reg_backend_current_version.c
index 7327dd9204..3bc09eef5b 100644
--- a/source3/registry/reg_backend_current_version.c
+++ b/source3/registry/reg_backend_current_version.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 278359fa74..3f9fdb6a0b 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "registry.h"
#include "reg_db.h"
+#include "reg_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_perflib.c b/source3/registry/reg_backend_perflib.c
index db8e7a3c5d..32f377634a 100644
--- a/source3/registry/reg_backend_perflib.c
+++ b/source3/registry/reg_backend_perflib.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c
index 25a7ff7583..3990fb1c5e 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_util.c b/source3/registry/reg_util.c
index 483523f100..f815ffd5f2 100644
--- a/source3/registry/reg_util.c
+++ b/source3/registry/reg_util.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_util.h b/source3/registry/reg_util.h
new file mode 100644
index 0000000000..886e58cda1
--- /dev/null
+++ b/source3/registry/reg_util.h
@@ -0,0 +1,29 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Virtual Windows Registry Layer (utility functions)
+ * Copyright (C) Gerald Carter 2002-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_UTIL_H
+#define _REG_UTIL_H
+
+bool reg_split_path(char *path, char **base, char **new_path);
+bool reg_split_key(char *path, char **base, char **key);
+char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
+void normalize_dbkey(char *key);
+char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
+
+#endif /* _REG_UTIL_H */