From e19c4f278b5467327df7a90256802382c7999414 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 11 Apr 2011 14:20:32 +0200 Subject: libsmbconf: Convert smbconf_delete_parameter() to sbcErr. Signed-off-by: Michael Adam --- lib/smbconf/smbconf.c | 11 +++++------ lib/smbconf/smbconf.h | 4 ++-- lib/smbconf/smbconf_private.h | 2 +- lib/smbconf/smbconf_txt.c | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'lib/smbconf') 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, -- cgit