diff options
| author | Martin Schwenke <martin@meltin.net> | 2014-08-15 15:46:33 +1000 |
|---|---|---|
| committer | Amitay Isaacs <amitay@samba.org> | 2014-09-10 01:36:15 +0200 |
| commit | acf26089f18c163290a0540ece1209aea26834d5 (patch) | |
| tree | 6ee94c44c1a8e93b1648f8c54cb94efba46f6638 /ctdb/lib | |
| parent | 088e4ab3ac22112a11cb685bb048bf49bf55c592 (diff) | |
| download | samba-acf26089f18c163290a0540ece1209aea26834d5.tar.gz samba-acf26089f18c163290a0540ece1209aea26834d5.tar.xz samba-acf26089f18c163290a0540ece1209aea26834d5.zip | |
ctdb-util: Rename db_wrap to tdb_wrap and make it a build subsystem
This makes it consistent with Samba, to ease transition.
Update unit test code to link to with tdb_wrap instead of including
db_wrap.c.
There are some potential whitespace fixes in this commit that have
been ignored. CTDB's lib/tdb_wrap will be deleted after the
transition to Samba's lib/tdb_wrap, so there's no point polishing it
too much.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/lib')
| -rw-r--r-- | ctdb/lib/tdb_wrap/tdb_wrap.c (renamed from ctdb/lib/util/db_wrap.c) | 14 | ||||
| -rw-r--r-- | ctdb/lib/tdb_wrap/tdb_wrap.h (renamed from ctdb/lib/util/db_wrap.h) | 8 | ||||
| -rwxr-xr-x | ctdb/lib/tdb_wrap/wscript_build | 7 | ||||
| -rwxr-xr-x | ctdb/lib/util/wscript_build | 2 |
4 files changed, 19 insertions, 12 deletions
diff --git a/ctdb/lib/util/db_wrap.c b/ctdb/lib/tdb_wrap/tdb_wrap.c index bc174a42a8..2a6dbe5e82 100644 --- a/ctdb/lib/util/db_wrap.c +++ b/ctdb/lib/tdb_wrap/tdb_wrap.c @@ -1,20 +1,20 @@ -/* +/* Unix SMB/CIFS implementation. database wrap functions Copyright (C) Andrew Tridgell 2004 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ @@ -29,7 +29,7 @@ #include "includes.h" #include "lib/util/dlinklist.h" #include "tdb.h" -#include "db_wrap.h" +#include "tdb_wrap.h" static struct tdb_wrap *tdb_list; @@ -41,7 +41,7 @@ static int tdb_wrap_destructor(struct tdb_wrap *w) tdb_close(w->tdb); DLIST_REMOVE(tdb_list, w); return 0; -} +} static void log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) { @@ -88,7 +88,7 @@ struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx, return NULL; } - w->tdb = tdb_open_ex(name, hash_size, tdb_flags, + w->tdb = tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, &log_ctx, NULL); if (w->tdb == NULL) { talloc_free(w); diff --git a/ctdb/lib/util/db_wrap.h b/ctdb/lib/tdb_wrap/tdb_wrap.h index 5ae5fd10ae..b11d9585e3 100644 --- a/ctdb/lib/util/db_wrap.h +++ b/ctdb/lib/tdb_wrap/tdb_wrap.h @@ -1,20 +1,20 @@ -/* +/* Unix SMB/CIFS implementation. database wrap headers Copyright (C) Andrew Tridgell 2004 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ diff --git a/ctdb/lib/tdb_wrap/wscript_build b/ctdb/lib/tdb_wrap/wscript_build new file mode 100755 index 0000000000..39a128aeab --- /dev/null +++ b/ctdb/lib/tdb_wrap/wscript_build @@ -0,0 +1,7 @@ +#!/usr/bin/python + +bld.SAMBA_SUBSYSTEM('tdb-wrap', + source='tdb_wrap.c', + deps='tdb talloc', + local_include=False + ) diff --git a/ctdb/lib/util/wscript_build b/ctdb/lib/util/wscript_build index 243566860a..89e69588b0 100755 --- a/ctdb/lib/util/wscript_build +++ b/ctdb/lib/util/wscript_build @@ -1,7 +1,7 @@ #!/usr/bin/env python bld.SAMBA_SUBSYSTEM('ctdb-util', - source='''util.c util_file.c util_time.c db_wrap.c + source='''util.c util_file.c util_time.c debug.c fault.c idtree.c signal.c substitute.c''', deps='tdb talloc', |
