diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-11 14:20:32 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:21 +0200 |
commit | e19c4f278b5467327df7a90256802382c7999414 (patch) | |
tree | 5319762a937aefe7ce2c6dc935b0ebc4c4a5b407 /lib/smbconf | |
parent | ff5838d97aad5b283073726052456b06ecf410b2 (diff) | |
download | samba-e19c4f278b5467327df7a90256802382c7999414.tar.gz samba-e19c4f278b5467327df7a90256802382c7999414.tar.bz2 samba-e19c4f278b5467327df7a90256802382c7999414.zip |
libsmbconf: Convert smbconf_delete_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib/smbconf')
-rw-r--r-- | lib/smbconf/smbconf.c | 11 | ||||
-rw-r--r-- | lib/smbconf/smbconf.h | 4 | ||||
-rw-r--r-- | lib/smbconf/smbconf_private.h | 2 | ||||
-rw-r--r-- | lib/smbconf/smbconf_txt.c | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/lib/smbconf/smbconf.c b/lib/smbconf/smbconf.c index 02c49cc877..a6bb64fec8 100644 --- a/lib/smbconf/smbconf.c +++ b/lib/smbconf/smbconf.c @@ -330,7 +330,7 @@ sbcErr smbconf_get_global_parameter(struct smbconf_ctx *ctx, /** * delete a parameter from configuration */ -WERROR smbconf_delete_parameter(struct smbconf_ctx *ctx, +sbcErr smbconf_delete_parameter(struct smbconf_ctx *ctx, const char *service, const char *param) { return ctx->ops->delete_parameter(ctx, service, param); @@ -341,19 +341,18 @@ WERROR smbconf_delete_parameter(struct smbconf_ctx *ctx, * * Create [global] if it does not exist. */ -WERROR smbconf_delete_global_parameter(struct smbconf_ctx *ctx, +sbcErr smbconf_delete_global_parameter(struct smbconf_ctx *ctx, const char *param) { - WERROR werr; sbcErr err; err = smbconf_global_check(ctx); if (!SBC_ERROR_IS_OK(err)) { - return WERR_GENERAL_FAILURE; + return err; } - werr = smbconf_delete_parameter(ctx, GLOBAL_NAME, param); + err = smbconf_delete_parameter(ctx, GLOBAL_NAME, param); - return werr; + return err; } WERROR smbconf_get_includes(struct smbconf_ctx *ctx, diff --git a/lib/smbconf/smbconf.h b/lib/smbconf/smbconf.h index 15476f1460..e0a3ed5054 100644 --- a/lib/smbconf/smbconf.h +++ b/lib/smbconf/smbconf.h @@ -107,9 +107,9 @@ sbcErr smbconf_get_global_parameter(struct smbconf_ctx *ctx, TALLOC_CTX *mem_ctx, const char *param, char **valstr); -WERROR smbconf_delete_parameter(struct smbconf_ctx *ctx, +sbcErr smbconf_delete_parameter(struct smbconf_ctx *ctx, const char *service, const char *param); -WERROR smbconf_delete_global_parameter(struct smbconf_ctx *ctx, +sbcErr smbconf_delete_global_parameter(struct smbconf_ctx *ctx, const char *param); WERROR smbconf_get_includes(struct smbconf_ctx *ctx, TALLOC_CTX *mem_ctx, diff --git a/lib/smbconf/smbconf_private.h b/lib/smbconf/smbconf_private.h index 9bfcbe097a..c46d30279b 100644 --- a/lib/smbconf/smbconf_private.h +++ b/lib/smbconf/smbconf_private.h @@ -57,7 +57,7 @@ struct smbconf_ops { const char *service, const char *param, char **valstr); - WERROR (*delete_parameter)(struct smbconf_ctx *ctx, + sbcErr (*delete_parameter)(struct smbconf_ctx *ctx, const char *service, const char *param); WERROR (*get_includes)(struct smbconf_ctx *ctx, TALLOC_CTX *mem_ctx, diff --git a/lib/smbconf/smbconf_txt.c b/lib/smbconf/smbconf_txt.c index e31009e7b2..17dee486d5 100644 --- a/lib/smbconf/smbconf_txt.c +++ b/lib/smbconf/smbconf_txt.c @@ -526,11 +526,11 @@ static sbcErr smbconf_txt_get_parameter(struct smbconf_ctx *ctx, /** * delete a parameter from configuration */ -static WERROR smbconf_txt_delete_parameter(struct smbconf_ctx *ctx, +static sbcErr smbconf_txt_delete_parameter(struct smbconf_ctx *ctx, const char *service, const char *param) { - return WERR_NOT_SUPPORTED; + return SBC_ERR_NOT_SUPPORTED; } static WERROR smbconf_txt_get_includes(struct smbconf_ctx *ctx, |