Fix PNP_GetHwProfInfo() (fixes Bug: #5888).
[Samba.git] / source / registry / reg_init_basic.c
blobc5e2c346b0c649dc6c19de8413c8fb0ef5e3882a
1 /*
2 * Unix SMB/CIFS implementation.
3 * Registry helper routines
4 * Copyright (C) Michael Adam 2008
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option)
9 * any later version.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, see <http://www.gnu.org/licenses/>.
20 #include "includes.h"
22 #undef DBGC_CLASS
23 #define DBGC_CLASS DBGC_REGISTRY
25 WERROR registry_init_common(void)
27 WERROR werr;
29 werr = regdb_init();
30 if (!W_ERROR_IS_OK(werr)) {
31 DEBUG(0, ("Failed to initialize the registry: %s\n",
32 dos_errstr(werr)));
33 goto done;
36 werr = reghook_cache_init();
37 if (!W_ERROR_IS_OK(werr)) {
38 DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
39 dos_errstr(werr)));
42 done:
43 return werr;
46 WERROR registry_init_basic(void)
48 WERROR werr;
50 DEBUG(10, ("registry_init_basic called\n"));
52 werr = registry_init_common();
53 regdb_close();
54 return werr;