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 /source3/utils | |
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 'source3/utils')
-rw-r--r-- | source3/utils/net_conf.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 187735027b..bee8dd2a19 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; } |