mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
s3:nmbd: Use C99 initializer for poptOption in nmbd
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
025b32e525
commit
e9ef830f65
@ -788,16 +788,65 @@ static bool open_sockets(bool isdaemon, int port)
|
||||
OPT_LOG_STDOUT
|
||||
};
|
||||
struct poptOption long_options[] = {
|
||||
POPT_AUTOHELP
|
||||
{"daemon", 'D', POPT_ARG_NONE, NULL, OPT_DAEMON, "Become a daemon(default)" },
|
||||
{"interactive", 'i', POPT_ARG_NONE, NULL, OPT_INTERACTIVE, "Run interactive (not a daemon)" },
|
||||
{"foreground", 'F', POPT_ARG_NONE, NULL, OPT_FORK, "Run daemon in foreground (for daemontools & etc)" },
|
||||
{"no-process-group", 0, POPT_ARG_NONE, NULL, OPT_NO_PROCESS_GROUP, "Don't create a new process group" },
|
||||
{"log-stdout", 'S', POPT_ARG_NONE, NULL, OPT_LOG_STDOUT, "Log to stdout" },
|
||||
{"hosts", 'H', POPT_ARG_STRING, &p_lmhosts, 0, "Load a netbios hosts file"},
|
||||
{"port", 'p', POPT_ARG_INT, &global_nmb_port, 0, "Listen on the specified port" },
|
||||
POPT_COMMON_SAMBA
|
||||
{ NULL }
|
||||
POPT_AUTOHELP
|
||||
{
|
||||
.longName = "daemon",
|
||||
.shortName = 'D',
|
||||
.argInfo = POPT_ARG_NONE,
|
||||
.arg = NULL,
|
||||
.val = OPT_DAEMON,
|
||||
.descrip = "Become a daemon(default)",
|
||||
},
|
||||
{
|
||||
.longName = "interactive",
|
||||
.shortName = 'i',
|
||||
.argInfo = POPT_ARG_NONE,
|
||||
.arg = NULL,
|
||||
.val = OPT_INTERACTIVE,
|
||||
.descrip = "Run interactive (not a daemon)",
|
||||
},
|
||||
{
|
||||
.longName = "foreground",
|
||||
.shortName = 'F',
|
||||
.argInfo = POPT_ARG_NONE,
|
||||
.arg = NULL,
|
||||
.val = OPT_FORK,
|
||||
.descrip = "Run daemon in foreground (for daemontools & etc)",
|
||||
},
|
||||
{
|
||||
.longName = "no-process-group",
|
||||
.shortName = 0,
|
||||
.argInfo = POPT_ARG_NONE,
|
||||
.arg = NULL,
|
||||
.val = OPT_NO_PROCESS_GROUP,
|
||||
.descrip = "Don't create a new process group",
|
||||
},
|
||||
{
|
||||
.longName = "log-stdout",
|
||||
.shortName = 'S',
|
||||
.argInfo = POPT_ARG_NONE,
|
||||
.arg = NULL,
|
||||
.val = OPT_LOG_STDOUT,
|
||||
.descrip = "Log to stdout",
|
||||
},
|
||||
{
|
||||
.longName = "hosts",
|
||||
.shortName = 'H',
|
||||
.argInfo = POPT_ARG_STRING,
|
||||
.arg = &p_lmhosts,
|
||||
.val = 0,
|
||||
.descrip = "Load a netbios hosts file",
|
||||
},
|
||||
{
|
||||
.longName = "port",
|
||||
.shortName = 'p',
|
||||
.argInfo = POPT_ARG_INT,
|
||||
.arg = &global_nmb_port,
|
||||
.val = 0,
|
||||
.descrip = "Listen on the specified port",
|
||||
},
|
||||
POPT_COMMON_SAMBA
|
||||
POPT_TABLEEND
|
||||
};
|
||||
TALLOC_CTX *frame;
|
||||
NTSTATUS status;
|
||||
|
Loading…
Reference in New Issue
Block a user