From 734ddacc915aa6008b7189b4c8124bc8ee6b6890 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 25 Dec 2007 02:42:33 +0100 Subject: Add error reporting to net_conf_delshare(). Michael (This used to be commit 8d02a2de61eb6b62fef1fbe57194c9d286423ba0) --- source3/utils/net_conf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3') 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; } -- cgit