diff options
author | Andreas Schneider <asn@samba.org> | 2019-01-08 12:18:23 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-01-28 10:29:13 +0100 |
commit | b0dbc7d1f5072e82346059a156af7e1c13dac28c (patch) | |
tree | 1711778cef022621d58074e2c35c9c2cefeda937 /source3/client | |
parent | 53e2e8c37df765479f7478982b5fda31f26a3039 (diff) | |
download | samba-b0dbc7d1f5072e82346059a156af7e1c13dac28c.tar.gz |
s3:client: Use C99 initializer for poptOption in smbclient
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 145 |
1 files changed, 130 insertions, 15 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 3a31463cdbb..9db8ff65717 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -6340,21 +6340,136 @@ int main(int argc,char *argv[]) struct poptOption long_options[] = { POPT_AUTOHELP - { "name-resolve", 'R', POPT_ARG_STRING, &new_name_resolve_order, 'R', "Use these name resolution services only", "NAME-RESOLVE-ORDER" }, - { "message", 'M', POPT_ARG_STRING, NULL, 'M', "Send message", "HOST" }, - { "ip-address", 'I', POPT_ARG_STRING, NULL, 'I', "Use this IP to connect to", "IP" }, - { "stderr", 'E', POPT_ARG_NONE, NULL, 'E', "Write messages to stderr instead of stdout" }, - { "list", 'L', POPT_ARG_STRING, NULL, 'L', "Get a list of shares available on a host", "HOST" }, - { "max-protocol", 'm', POPT_ARG_STRING, NULL, 'm', "Set the max protocol level", "LEVEL" }, - { "tar", 'T', POPT_ARG_STRING, NULL, 'T', "Command line tar", "<c|x>IXFqgbNan" }, - { "directory", 'D', POPT_ARG_STRING, NULL, 'D', "Start from directory", "DIR" }, - { "command", 'c', POPT_ARG_STRING, &cmdstr, 'c', "Execute semicolon separated commands" }, - { "send-buffer", 'b', POPT_ARG_INT, &io_bufsize, 'b', "Changes the transmit/send buffer", "BYTES" }, - { "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" }, + { + .longName = "name-resolve", + .shortName = 'R', + .argInfo = POPT_ARG_STRING, + .arg = &new_name_resolve_order, + .val = 'R', + .descrip = "Use these name resolution services only", + .argDescrip = "NAME-RESOLVE-ORDER", + }, + { + .longName = "message", + .shortName = 'M', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'M', + .descrip = "Send message", + .argDescrip = "HOST", + }, + { + .longName = "ip-address", + .shortName = 'I', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'I', + .descrip = "Use this IP to connect to", + .argDescrip = "IP", + }, + { + .longName = "stderr", + .shortName = 'E', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'E', + .descrip = "Write messages to stderr instead of stdout", + }, + { + .longName = "list", + .shortName = 'L', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'L', + .descrip = "Get a list of shares available on a host", + .argDescrip = "HOST", + }, + { + .longName = "max-protocol", + .shortName = 'm', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'm', + .descrip = "Set the max protocol level", + .argDescrip = "LEVEL", + }, + { + .longName = "tar", + .shortName = 'T', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'T', + .descrip = "Command line tar", + .argDescrip = "<c|x>IXFqgbNan", + }, + { + .longName = "directory", + .shortName = 'D', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'D', + .descrip = "Start from directory", + .argDescrip = "DIR", + }, + { + .longName = "command", + .shortName = 'c', + .argInfo = POPT_ARG_STRING, + .arg = &cmdstr, + .val = 'c', + .descrip = "Execute semicolon separated commands", + }, + { + .longName = "send-buffer", + .shortName = 'b', + .argInfo = POPT_ARG_INT, + .arg = &io_bufsize, + .val = 'b', + .descrip = "Changes the transmit/send buffer", + .argDescrip = "BYTES", + }, + { + .longName = "timeout", + .shortName = 't', + .argInfo = POPT_ARG_INT, + .arg = &io_timeout, + .val = 'b', + .descrip = "Changes the per-operation timeout", + .argDescrip = "SECONDS", + }, + { + .longName = "port", + .shortName = 'p', + .argInfo = POPT_ARG_INT, + .arg = &port, + .val = 'p', + .descrip = "Port to connect to", + .argDescrip = "PORT", + }, + { + .longName = "grepable", + .shortName = 'g', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'g', + .descrip = "Produce grepable output", + }, + { + .longName = "quiet", + .shortName = 'q', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'q', + .descrip = "Suppress help message", + }, + { + .longName = "browse", + .shortName = 'B', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'B', + .descrip = "Browse SMB servers using DNS", + }, POPT_COMMON_SAMBA POPT_COMMON_CONNECTION POPT_COMMON_CREDENTIALS |