summaryrefslogtreecommitdiff
path: root/ctdb/common
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-05-20 15:12:56 +0200
committerJeremy Allison <jra@samba.org>2019-05-23 18:08:36 +0000
commit1f9b8964ca868f70adee0f63e1df67a08d611bf2 (patch)
tree4eb7c478d3524463eca9cd232944cd365930f735 /ctdb/common
parent1a59b0fa638ce33f7a7fda07f26509a3370b76b4 (diff)
downloadsamba-1f9b8964ca868f70adee0f63e1df67a08d611bf2.tar.gz
ctdb: Remove unused ctdb_ltdb_fetch_with_header()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 23 18:08:36 UTC 2019 on sn-devel-184
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/common.h4
-rw-r--r--ctdb/common/ctdb_ltdb.c35
2 files changed, 0 insertions, 39 deletions
diff --git a/ctdb/common/common.h b/ctdb/common/common.h
index 02bb746c9b3..6b2c98ef383 100644
--- a/ctdb/common/common.h
+++ b/ctdb/common/common.h
@@ -61,10 +61,6 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
TDB_DATA key, struct ctdb_ltdb_header *header,
TALLOC_CTX *mem_ctx, TDB_DATA *data);
-int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db,
- TDB_DATA key, struct ctdb_ltdb_header *header,
- TALLOC_CTX *mem_ctx, TDB_DATA *data);
-
int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key,
struct ctdb_ltdb_header *header, TDB_DATA data);
diff --git a/ctdb/common/ctdb_ltdb.c b/ctdb/common/ctdb_ltdb.c
index f4f216e1ee3..de4f44895e4 100644
--- a/ctdb/common/ctdb_ltdb.c
+++ b/ctdb/common/ctdb_ltdb.c
@@ -222,41 +222,6 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
}
/*
- fetch a record from the ltdb, separating out the header information
- and returning the body of the record.
- if the record does not exist, *header will be NULL
- and data = {0, NULL}
-*/
-int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db,
- TDB_DATA key, struct ctdb_ltdb_header *header,
- TALLOC_CTX *mem_ctx, TDB_DATA *data)
-{
- TDB_DATA rec;
-
- rec = tdb_fetch(ctdb_db->ltdb->tdb, key);
- if (rec.dsize < sizeof(*header)) {
- free(rec.dptr);
-
- data->dsize = 0;
- data->dptr = NULL;
- return -1;
- }
-
- *header = *(struct ctdb_ltdb_header *)rec.dptr;
- if (data) {
- data->dsize = rec.dsize - sizeof(struct ctdb_ltdb_header);
- data->dptr = talloc_memdup(mem_ctx,
- sizeof(struct ctdb_ltdb_header)+rec.dptr,
- data->dsize);
- }
-
- free(rec.dptr);
-
- return 0;
-}
-
-
-/*
write a record to a normal database
*/
int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key,