From: Andreas Schneider Date: Wed, 11 Nov 2020 08:56:41 +0000 (+0100) Subject: s3:client: Use samba_popt_get_context() X-Git-Tag: tevent-0.11.0~796 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b70a72b15c64347d00f5e081b1ce5c82c5c8bcb;p=thirdparty%2Fsamba.git s3:client: Use samba_popt_get_context() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source3/client/client.c b/source3/client/client.c index 0da64cbdbd8..b20ac986dc9 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -6426,7 +6426,16 @@ int main(int argc,char *argv[]) lp_set_cmdline("log level", "1"); /* skip argv(0) */ - pc = poptGetContext("smbclient", argc, const_argv, long_options, 0); + pc = samba_popt_get_context(getprogname(), + argc, + const_argv, + long_options, + 0); + if (pc == NULL) { + DBG_ERR("Failed to setup popt context!\n"); + exit(1); + } + poptSetOtherOptionHelp(pc, "[OPTIONS] service "); creds = samba_cmdline_get_creds();