1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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>
This commit is contained in:
Justin Stephenson 2018-06-25 09:58:56 -04:00 committed by Andreas Schneider
parent 113da7ac67
commit 89a8b3ecd4

View File

@ -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;