summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-25 02:42:33 +0100
committerMichael Adam <obnox@samba.org>2007-12-25 02:42:33 +0100
commit734ddacc915aa6008b7189b4c8124bc8ee6b6890 (patch)
tree683e283195dc03331924f9fea5966d021d9f0fdc /source3/utils
parent86486fcc9826663f7bf03fe4ceb354818415d089 (diff)
downloadsamba-734ddacc915aa6008b7189b4c8124bc8ee6b6890.tar.gz
samba-734ddacc915aa6008b7189b4c8124bc8ee6b6890.tar.bz2
samba-734ddacc915aa6008b7189b4c8124bc8ee6b6890.zip
Add error reporting to net_conf_delshare().
Michael (This used to be commit 8d02a2de61eb6b62fef1fbe57194c9d286423ba0)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_conf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 38c14d779f..54875c49a3 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -792,6 +792,7 @@ int net_conf_delshare(int argc, const char **argv)
{
int ret = -1;
const char *sharename = NULL;
+ WERROR werr = WERR_OK;
if (argc != 1) {
net_conf_delshare_usage(argc, argv);
@@ -799,9 +800,14 @@ int net_conf_delshare(int argc, const char **argv)
}
sharename = argv[0];
- if (W_ERROR_IS_OK(libnet_smbconf_delshare(sharename))) {
- ret = 0;
+ werr = libnet_smbconf_delshare(sharename);
+ if (!W_ERROR_IS_OK(werr)) {
+ d_fprintf(stderr, "Error deleting share %s: %s\n",
+ sharename, dos_errstr(werr));
+ goto done;
}
+
+ ret = 0;
done:
return ret;
}