diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-07 17:19:03 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:20 +0200 |
commit | 29eea4b09ad2e99504f42a3c29195fb4757792dd (patch) | |
tree | 97bff20a1b7977b07e0576960cb1b3b4830dbec0 /source3/lib/smbconf/smbconf_init.c | |
parent | b34e1768b762ae46e4fe761d9691ed09d285c9a9 (diff) | |
download | samba-29eea4b09ad2e99504f42a3c29195fb4757792dd.tar.gz samba-29eea4b09ad2e99504f42a3c29195fb4757792dd.tar.bz2 samba-29eea4b09ad2e99504f42a3c29195fb4757792dd.zip |
libsmbconf: Convert smbconf_init() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib/smbconf/smbconf_init.c')
-rw-r--r-- | source3/lib/smbconf/smbconf_init.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/lib/smbconf/smbconf_init.c b/source3/lib/smbconf/smbconf_init.c index 36c51de5f0..2587a4fc53 100644 --- a/source3/lib/smbconf/smbconf_init.c +++ b/source3/lib/smbconf/smbconf_init.c @@ -34,28 +34,28 @@ * - "registry" or "reg" * - "txt" or "file" */ -WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, +sbcErr smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, const char *source) { - WERROR werr; + sbcErr err; char *backend = NULL; char *path = NULL; char *sep; TALLOC_CTX *tmp_ctx = talloc_stackframe(); if (conf_ctx == NULL) { - werr = WERR_INVALID_PARAM; + err = SBC_ERR_INVALID_PARAM; goto done; } if ((source == NULL) || (*source == '\0')) { - werr = WERR_INVALID_PARAM; + err = SBC_ERR_INVALID_PARAM; goto done; } backend = talloc_strdup(tmp_ctx, source); if (backend == NULL) { - werr = WERR_NOMEM; + err = SBC_ERR_NOMEM; goto done; } @@ -69,16 +69,16 @@ WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, } if (strequal(backend, "registry") || strequal(backend, "reg")) { - werr = smbconf_init_reg(mem_ctx, conf_ctx, path); + err = smbconf_init_reg(mem_ctx, conf_ctx, path); } else if (strequal(backend, "file") || strequal(backend, "txt")) { - werr = smbconf_init_txt(mem_ctx, conf_ctx, path); + err = smbconf_init_txt(mem_ctx, conf_ctx, path); } else if (sep == NULL) { /* * If no separator was given in the source, and the string is * not a known backend, assume file backend and use the source * string as a path argument. */ - werr = smbconf_init_txt(mem_ctx, conf_ctx, backend); + err = smbconf_init_txt(mem_ctx, conf_ctx, backend); } else { /* * Separator was specified but this is not a known backend. @@ -87,10 +87,10 @@ WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, * This may occur with an include directive like this: * 'include = /path/to/file.%T' */ - werr = smbconf_init_txt(mem_ctx, conf_ctx, source); + err = smbconf_init_txt(mem_ctx, conf_ctx, source); } done: talloc_free(tmp_ctx); - return werr; + return err; } |