summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-04-11 13:23:26 +0200
committerMichael Adam <obnox@samba.org>2011-05-10 19:13:21 +0200
commitddc28a683fcf036a279a0d3d7b23504364316fa6 (patch)
tree9b7f70351c2a22c1102092b54291e089ce725c28 /lib
parentfbd7626656d8d76f371e431005fbfa1228ba2029 (diff)
downloadsamba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.gz
samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.bz2
samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.zip
libsmbconf: Convert smbconf_set_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/smbconf/smbconf.c11
-rw-r--r--lib/smbconf/smbconf.h4
-rw-r--r--lib/smbconf/smbconf_private.h2
-rw-r--r--lib/smbconf/smbconf_txt.c4
4 files changed, 10 insertions, 11 deletions
diff --git a/lib/smbconf/smbconf.c b/lib/smbconf/smbconf.c
index c02899c0d5..786f4d32d1 100644
--- a/lib/smbconf/smbconf.c
+++ b/lib/smbconf/smbconf.c
@@ -260,7 +260,7 @@ sbcErr smbconf_delete_share(struct smbconf_ctx *ctx, const char *servicename)
/**
* set a configuration parameter to the value provided.
*/
-WERROR smbconf_set_parameter(struct smbconf_ctx *ctx,
+sbcErr smbconf_set_parameter(struct smbconf_ctx *ctx,
const char *service,
const char *param,
const char *valstr)
@@ -274,19 +274,18 @@ WERROR smbconf_set_parameter(struct smbconf_ctx *ctx,
*
* This also creates [global] when it does not exist.
*/
-WERROR smbconf_set_global_parameter(struct smbconf_ctx *ctx,
+sbcErr smbconf_set_global_parameter(struct smbconf_ctx *ctx,
const char *param, const char *val)
{
- WERROR werr = WERR_OK;
sbcErr err;
err = smbconf_global_check(ctx);
if (!SBC_ERROR_IS_OK(err)) {
- return WERR_GENERAL_FAILURE;
+ return err;
}
- werr = smbconf_set_parameter(ctx, GLOBAL_NAME, param, val);
+ err = smbconf_set_parameter(ctx, GLOBAL_NAME, param, val);
- return werr;
+ return err;
}
/**
diff --git a/lib/smbconf/smbconf.h b/lib/smbconf/smbconf.h
index af021f95d7..1471ceca1d 100644
--- a/lib/smbconf/smbconf.h
+++ b/lib/smbconf/smbconf.h
@@ -91,11 +91,11 @@ sbcErr smbconf_get_share(struct smbconf_ctx *ctx,
struct smbconf_service **service);
sbcErr smbconf_delete_share(struct smbconf_ctx *ctx,
const char *servicename);
-WERROR smbconf_set_parameter(struct smbconf_ctx *ctx,
+sbcErr smbconf_set_parameter(struct smbconf_ctx *ctx,
const char *service,
const char *param,
const char *valstr);
-WERROR smbconf_set_global_parameter(struct smbconf_ctx *ctx,
+sbcErr smbconf_set_global_parameter(struct smbconf_ctx *ctx,
const char *param, const char *val);
WERROR smbconf_get_parameter(struct smbconf_ctx *ctx,
TALLOC_CTX *mem_ctx,
diff --git a/lib/smbconf/smbconf_private.h b/lib/smbconf/smbconf_private.h
index 0fa47e87a7..b11a1420ae 100644
--- a/lib/smbconf/smbconf_private.h
+++ b/lib/smbconf/smbconf_private.h
@@ -48,7 +48,7 @@ struct smbconf_ops {
struct smbconf_service **service);
sbcErr (*delete_share)(struct smbconf_ctx *ctx,
const char *servicename);
- WERROR (*set_parameter)(struct smbconf_ctx *ctx,
+ sbcErr (*set_parameter)(struct smbconf_ctx *ctx,
const char *service,
const char *param,
const char *valstr);
diff --git a/lib/smbconf/smbconf_txt.c b/lib/smbconf/smbconf_txt.c
index 1017b5a1c8..0f77254d38 100644
--- a/lib/smbconf/smbconf_txt.c
+++ b/lib/smbconf/smbconf_txt.c
@@ -471,12 +471,12 @@ static sbcErr smbconf_txt_delete_share(struct smbconf_ctx *ctx,
/**
* set a configuration parameter to the value provided.
*/
-static WERROR smbconf_txt_set_parameter(struct smbconf_ctx *ctx,
+static sbcErr smbconf_txt_set_parameter(struct smbconf_ctx *ctx,
const char *service,
const char *param,
const char *valstr)
{
- return WERR_NOT_SUPPORTED;
+ return SBC_ERR_NOT_SUPPORTED;
}
/**