1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Martin Schwenke
9869ac1fb7 ctdb-tools: Fix signed/unsigned conversion by declaring as size_t
All the top-level callers pass size_t.

Drop the ternary operator.  The value of hsize is always positive
because it is unsigned.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-06-05 10:25:49 +00:00
Martin Schwenke
282221b0d6 ctdb-tools: Fix signed/unsigned comparison by declaring as int
There's no point using unsigned here.  tdb_traverse() returns an int
for the number of records traversed and the number of empty records
can't exceed this value.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-06-05 10:25:49 +00:00
Andreas Schneider
fb57c97ce4 ctdb:tools: Use correct C99 initializer for ltdb_header
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:21 +01:00
Amitay Isaacs
2c736f4408 ctdb-tools: Simplify using a local variable
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2016-10-27 23:53:13 +02:00
Amitay Isaacs
e42648f977 ctdb-tools: Simplify using tdb_storev
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2016-10-27 23:53:13 +02:00
Christof Schmitt
84a13e70a6 ctdb/ltdbtool: Fix static declarations
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 30 04:28:13 CEST 2016 on sn-devel-144
2016-04-30 04:28:13 +02:00
Amitay Isaacs
3b71d05927 ctdb-tools: Use replace headers instead of system headers
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-11-04 00:47:16 +01:00
Martin Schwenke
613313fa52 tool/ltdbtool: -h option does not require an argument
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9e18f3c173863919587e25d704f66372624ed8ed)
2013-09-25 14:35:46 +10:00
Amitay Isaacs
e062555da0 tools/ltdbtool: Fix handling of -e option
Also, include description of -e option in usage.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 35264e42ade4676468cf7713fa339c784e932953)
2013-04-08 14:25:34 +10:00
Gregor Beck
28a434051c ltdbtool: ignore empty (deleted) records per default.
Add option -e to get the old behaviour and process empty records too.

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit d9859540c2000864bc6c58be5afe19aa3b1064b2)
2011-10-12 22:38:02 +02:00
Gregor Beck
082de99f87 add ltdbtool - a standalone ltdb tool
This this is a tool to handle (dump and convert) ctdb's local tdb
copies (ltdbs) without connecting to a ctdb daemon.

It can be used to

* dump the contents of a ltdb, printing
  the ctdb record header information

* dump a non-clustered tdb database (like tdbdump)

* convert between an ltdb and a non-clustered tdb
  (adding or removing ctdb headers)

* convert between 64 and 32 bit ltdbs
  (the ctdb record headers differ by 4 bytes of padding)

usage: bin/ltdbtool dump [-p] [-s{0|32|64}] <idb>
       bin/ltdbtool convert [-s{0|32|64}] [-o{0|32|64}] <idb> <odb>

Pair-Programmed-With: Michael Adam <obnox@samba.org>

(This used to be ctdb commit efcf2815711cd5371633614fb91273bd0a786da0)
2011-05-04 12:48:50 +02:00