#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
-bool registry_init_basic(void)
+WERROR registry_init_common(void)
{
WERROR werr;
- DEBUG(10, ("registry_init_basic called\n"));
-
werr = regdb_init();
if (!W_ERROR_IS_OK(werr)) {
- DEBUG(1, ("Can't open the registry: %s\n", dos_errstr(werr)));
- return false;
+ DEBUG(0, ("Failed to initialize the registry: %s\n",
+ win_errstr(werr)));
+ goto done;
}
- regdb_close();
- reghook_cache_init();
+ werr = reghook_cache_init();
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
+ win_errstr(werr)));
+ goto done;
+ }
+
+ /* setup the necessary keys and values */
+
+ werr = init_registry_data();
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0, ("Failed to initialize data in registry!\n"));
+ }
- return true;
+done:
+ return werr;
+}
+
+WERROR registry_init_basic(void)
+{
+ WERROR werr;
+
+ DEBUG(10, ("registry_init_basic called\n"));
+
+ werr = registry_init_common();
+ regdb_close();
+ return werr;
}