summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJustin Stephenson <jstephen@redhat.com>2018-06-25 09:58:56 -0400
committerAndreas Schneider <asn@cryptomilk.org>2018-06-26 17:43:25 +0200
commit89a8b3ecd47b6d9a33e66f22d2786f0ae3b4cb72 (patch)
treed896b2b1aba1eccf4e3b10f2535e05ddcc5424d1 /source3/client
parent113da7ac67a79deb71e3bfb2def9abd85655f36f (diff)
downloadsamba-89a8b3ecd47b6d9a33e66f22d2786f0ae3b4cb72.tar.gz
s3:client: Add --quiet option to smbclient
Add quiet command-line argument to allow suppressing the help log message printed automatically after establishing a smbclient connection BUG: https://bugzilla.samba.org/show_bug.cgi?id=13485 Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Björn Baumbach <bb@sernet.de>
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 8dbf7474d25..f112b8c4ac1 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -52,6 +52,7 @@ static int port = 0;
static char *service;
static char *desthost;
static bool grepable = false;
+static bool quiet = false;
static char *cmdstr = NULL;
const char *cmd_ptr = NULL;
@@ -6066,7 +6067,9 @@ static int process_stdin(void)
{
int rc = 0;
- d_printf("Try \"help\" to get a list of possible commands.\n");
+ if (!quiet) {
+ d_printf("Try \"help\" to get a list of possible commands.\n");
+ }
while (!finished) {
TALLOC_CTX *frame = talloc_stackframe();
@@ -6336,6 +6339,7 @@ int main(int argc,char *argv[])
{ "timeout", 't', POPT_ARG_INT, &io_timeout, 'b', "Changes the per-operation timeout", "SECONDS" },
{ "port", 'p', POPT_ARG_INT, &port, 'p', "Port to connect to", "PORT" },
{ "grepable", 'g', POPT_ARG_NONE, NULL, 'g', "Produce grepable output" },
+ { "quiet", 'q', POPT_ARG_NONE, NULL, 'q', "Suppress help message" },
{ "browse", 'B', POPT_ARG_NONE, NULL, 'B', "Browse SMB servers using DNS" },
POPT_COMMON_SAMBA
POPT_COMMON_CONNECTION
@@ -6458,6 +6462,9 @@ int main(int argc,char *argv[])
case 'g':
grepable=true;
break;
+ case 'q':
+ quiet=true;
+ break;
case 'e':
smb_encrypt=true;
break;