diff options
author | Martin Schwenke <martin@meltin.net> | 2011-11-29 15:18:45 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-12-06 13:59:32 +1100 |
commit | 7f25864db096e36eb8e3500a6044d0988075f1ae (patch) | |
tree | 46eee53b1e11e0a8cf5fbd88013bc529dce1310d | |
parent | dbd452c801313ceba00b8fc89ffb7833b11524c2 (diff) | |
download | samba-7f25864db096e36eb8e3500a6044d0988075f1ae.tar.gz samba-7f25864db096e36eb8e3500a6044d0988075f1ae.tar.xz samba-7f25864db096e36eb8e3500a6044d0988075f1ae.zip |
ctdb tool - move parsing of nodestring to where it is needed
This puts the parsing and checking logic close together. This makes
it easy to change the parsing code. Changed parsing code can now
easily use both old client code and libctdb since both are guaranteed
to be setup.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 57fb074a65dc56168fc3813b79a5bab4b3727cf3)
-rw-r--r-- | ctdb/tools/ctdb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 1957617584..793e98f132 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -5310,15 +5310,6 @@ int main(int argc, const char *argv[]) signal(SIGALRM, ctdb_alarm); alarm(options.maxruntime); - /* setup the node number to contact */ - if (nodestring != NULL) { - if (strcmp(nodestring, "all") == 0) { - options.pnn = CTDB_BROADCAST_ALL; - } else { - options.pnn = strtoul(nodestring, NULL, 0); - } - } - control = extra_argv[0]; ev = event_context_init(NULL); @@ -5365,6 +5356,15 @@ int main(int argc, const char *argv[]) exit(1); } + /* setup the node number to contact */ + if (nodestring != NULL) { + if (strcmp(nodestring, "all") == 0) { + options.pnn = CTDB_BROADCAST_ALL; + } else { + options.pnn = strtoul(nodestring, NULL, 0); + } + } + /* verify the node exists */ verify_node(ctdb); |