[Pkg-samba-maint] [samba] 02/17: ctdb-locking: Remove support for locking multiple databases
Mathieu Parent
sathieu at moszumanska.debian.org
Mon Mar 6 11:50:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
sathieu pushed a commit to branch master
in repository samba.
commit 727f5d48512fe91d59fbdf7d0caa96d0f156e003
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Nov 29 17:13:41 2016 +1100
ctdb-locking: Remove support for locking multiple databases
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469
The code to lock multiple databases has been dropped from ctdb_lock.c.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 5b1076dc61f5e3f006c1b8cef98e7d2d3cc1bfba)
---
ctdb/server/ctdb_lock_helper.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/ctdb/server/ctdb_lock_helper.c b/ctdb/server/ctdb_lock_helper.c
index 8aa0870..10d6f01 100644
--- a/ctdb/server/ctdb_lock_helper.c
+++ b/ctdb/server/ctdb_lock_helper.c
@@ -72,7 +72,7 @@ static void usage(void)
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s <log-fd> <ctdbd-pid> <output-fd> RECORD <db-path> <db-flags> <db-key>\n",
progname);
- fprintf(stderr, " %s <log-fd> <ctdbd-pid> <output-fd> DB <db1-path> <db1-flags> [<db2-path> <db2-flags>...]\n",
+ fprintf(stderr, " %s <log-fd> <ctdbd-pid> <output-fd> DB <db1-path> <db1-flags>\n",
progname);
}
@@ -196,17 +196,14 @@ int main(int argc, char *argv[])
result = lock_record(argv[5], argv[6], argv[7]);
} else if (strcmp(lock_type, "DB") == 0) {
- int n;
-
- /* If there are no databases specified, no need for lock */
- if (argc > 5) {
- for (n=5; n+1<argc; n+=2) {
- result = lock_db(argv[n], argv[n+1]);
- if (result != 0) {
- break;
- }
- }
+ if (argc != 7) {
+ fprintf(stderr,
+ "locking: Invalid number of arguments (%d)\n",
+ argc);
+ usage();
+ exit(1);
}
+ result = lock_db(argv[5], argv[6]);
} else {
fprintf(stderr, "%s: Invalid lock-type '%s'\n", progname, lock_type);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list