summaryrefslogtreecommitdiffstats
path: root/debian/manpages/tdb_store.3
diff options
context:
space:
mode:
Diffstat (limited to 'debian/manpages/tdb_store.3')
-rw-r--r--debian/manpages/tdb_store.355
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/manpages/tdb_store.3 b/debian/manpages/tdb_store.3
new file mode 100644
index 0000000..d701963
--- /dev/null
+++ b/debian/manpages/tdb_store.3
@@ -0,0 +1,55 @@
+.TH TDB_STORE 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_store \- store a record in a tdb database.
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_store(TDB_CONTEXT *" tdb ", TDB_DATA " key ", TDB_DATA " record ", int " flag ");"
+.sp
+.SH DESCRIPTION
+Store a lump of data pointed to by
+.I record
+in the
+.I tdb
+database under the index pointed to by
+.I key.
+The TDB_DATA structure used by both
+.I key
+and
+.I record
+is defined as:
+.PP
+.RS
+.nf
+typedef struct {
+ char *dptr;
+ size_t dsize;
+} TDB_DATA;
+.fi
+.RE
+.PP
+The
+.I flag
+determines the way that tdb_store behaves and can be any one of the
+following values.
+.TP
+.B TDB_REPLACE
+Insert a record creating a new one or overwriting an existing one.
+.TP
+.B TDB_INSERT
+Insert a new entry but refuse to overwrite an existing entry.
+.TP
+.B TDB_MODIFY
+Replace an existing record with a new one. This will fail if,
+a record does not already exist.
+.PP
+.SH "RETURN VALUE"
+A return value of 0 indicates success and \-1 indicates failure.
+.SH AUTHORS
+Software: Andrew Tridgell <tridge@linuxcare.com> and
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <ben@valinux.com>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)