summaryrefslogtreecommitdiff
path: root/source3/utils/net_conf.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-04-11 14:20:32 +0200
committerMichael Adam <obnox@samba.org>2011-05-10 19:13:21 +0200
commite19c4f278b5467327df7a90256802382c7999414 (patch)
tree5319762a937aefe7ce2c6dc935b0ebc4c4a5b407 /source3/utils/net_conf.c
parentff5838d97aad5b283073726052456b06ecf410b2 (diff)
downloadsamba-e19c4f278b5467327df7a90256802382c7999414.tar.gz
libsmbconf: Convert smbconf_delete_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils/net_conf.c')
-rw-r--r--source3/utils/net_conf.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 187735027b4..bee8dd2a198 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -960,7 +960,7 @@ static int net_conf_delparm(struct net_context *c, struct smbconf_ctx *conf_ctx,
int argc, const char **argv)
{
int ret = -1;
- WERROR werr = WERR_OK;
+ sbcErr err;
char *service = NULL;
char *param = NULL;
TALLOC_CTX *mem_ctx = talloc_stackframe();
@@ -986,21 +986,20 @@ static int net_conf_delparm(struct net_context *c, struct smbconf_ctx *conf_ctx,
goto done;
}
- werr = smbconf_delete_parameter(conf_ctx, service, param);
-
- if (W_ERROR_EQUAL(werr, WERR_NO_SUCH_SERVICE)) {
+ err = smbconf_delete_parameter(conf_ctx, service, param);
+ if (SBC_ERROR_EQUAL(err, SBC_ERR_NO_SUCH_SERVICE)) {
d_fprintf(stderr,
_("Error: given service '%s' does not exist.\n"),
service);
goto done;
- } else if (W_ERROR_EQUAL(werr, WERR_INVALID_PARAM)) {
+ } else if (SBC_ERROR_EQUAL(err, SBC_ERR_INVALID_PARAM)) {
d_fprintf(stderr,
_("Error: given parameter '%s' is not set.\n"),
param);
goto done;
- } else if (!W_ERROR_IS_OK(werr)) {
+ } else if (!SBC_ERROR_IS_OK(err)) {
d_fprintf(stderr, _("Error deleting value '%s': %s.\n"),
- param, win_errstr(werr));
+ param, sbcErrorString(err));
goto done;
}