bool init_registry( void )
{
int i;
+ WERROR werr;
bool ret = false;
- if ( !regdb_init() ) {
- DEBUG(0, ("init_registry: failed to initialize the registry "
- "tdb!\n"));
+ werr = regdb_init();
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0, ("Failed to initialize the registry: %s\n",
+ dos_errstr(werr)));
goto fail;
}
/* setup the necessary keys and values */
if ( !init_registry_data() ) {
- DEBUG(0, ("regdb_init: Failed to initialize data in "
- "registry!\n"));
+ DEBUG(0, ("Failed to initialize data in registry!\n"));
goto fail;
}
reghook_cache_init();
for ( i=0; reg_hooks[i].keyname; i++ ) {
- if ( !reghook_cache_add(®_hooks[i]) )
+ if (!reghook_cache_add(reg_hooks[i].keyname, reg_hooks[i].ops))
goto fail;
}