mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
added daemon mode to ctdb_bench
(This used to be ctdb commit b1e71018866752d32f59170fd5c8ba01b05694d9)
This commit is contained in:
parent
e5fc2d4062
commit
4f0ea10fb3
@ -200,6 +200,7 @@ int main(int argc, const char *argv[])
|
||||
const char *transport = "tcp";
|
||||
const char *myaddress = NULL;
|
||||
int self_connect=0;
|
||||
int daemon_mode=0;
|
||||
|
||||
struct poptOption popt_options[] = {
|
||||
POPT_AUTOHELP
|
||||
@ -207,6 +208,7 @@ int main(int argc, const char *argv[])
|
||||
{ "listen", 0, POPT_ARG_STRING, &myaddress, 0, "address to listen on", "address" },
|
||||
{ "transport", 0, POPT_ARG_STRING, &transport, 0, "protocol transport", NULL },
|
||||
{ "self-connect", 0, POPT_ARG_NONE, &self_connect, 0, "enable self connect", "boolean" },
|
||||
{ "daemon", 0, POPT_ARG_NONE, &daemon_mode, 0, "spawn a ctdb daemon", "boolean" },
|
||||
{ "timelimit", 't', POPT_ARG_INT, &timelimit, 0, "timelimit", "integer" },
|
||||
{ "num-records", 'r', POPT_ARG_INT, &num_records, 0, "num_records", "integer" },
|
||||
{ "num-msgs", 'n', POPT_ARG_INT, &num_msgs, 0, "num_msgs", "integer" },
|
||||
@ -254,6 +256,9 @@ int main(int argc, const char *argv[])
|
||||
if (self_connect) {
|
||||
ctdb_set_flags(ctdb, CTDB_FLAG_SELF_CONNECT);
|
||||
}
|
||||
if (daemon_mode) {
|
||||
ctdb_set_flags(ctdb, CTDB_FLAG_DAEMON_MODE);
|
||||
}
|
||||
|
||||
ret = ctdb_set_transport(ctdb, transport);
|
||||
if (ret == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user