mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
r16917: Fix compile errors found by the testing of tdb on the build farm.
Andrew Bartlett
(This used to be commit a6e0846d9b
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
35fda6c5f3
commit
fabc6ae74d
@ -193,7 +193,7 @@ static void create_tdb(void)
|
|||||||
}
|
}
|
||||||
if (tdb) tdb_close(tdb);
|
if (tdb) tdb_close(tdb);
|
||||||
tdb = tdb_open_ex(tok, 0, TDB_CLEAR_IF_FIRST,
|
tdb = tdb_open_ex(tok, 0, TDB_CLEAR_IF_FIRST,
|
||||||
O_RDWR | O_CREAT | O_TRUNC, 0600, log_ctx, NULL);
|
O_RDWR | O_CREAT | O_TRUNC, 0600, &log_ctx, NULL);
|
||||||
if (!tdb) {
|
if (!tdb) {
|
||||||
printf("Could not create %s: %s\n", tok, strerror(errno));
|
printf("Could not create %s: %s\n", tok, strerror(errno));
|
||||||
}
|
}
|
||||||
@ -201,13 +201,16 @@ static void create_tdb(void)
|
|||||||
|
|
||||||
static void open_tdb(void)
|
static void open_tdb(void)
|
||||||
{
|
{
|
||||||
|
struct tdb_logging_context log_ctx;
|
||||||
|
log_ctx.log_fn = tdb_log;
|
||||||
|
|
||||||
char *tok = get_token(1);
|
char *tok = get_token(1);
|
||||||
if (!tok) {
|
if (!tok) {
|
||||||
help();
|
help();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tdb) tdb_close(tdb);
|
if (tdb) tdb_close(tdb);
|
||||||
tdb = tdb_open_ex(tok, 0, 0, O_RDWR, 0600, tdb_log, NULL, NULL);
|
tdb = tdb_open_ex(tok, 0, 0, O_RDWR, 0600, &log_ctx, NULL);
|
||||||
if (!tdb) {
|
if (!tdb) {
|
||||||
printf("Could not open %s: %s\n", tok, strerror(errno));
|
printf("Could not open %s: %s\n", tok, strerror(errno));
|
||||||
}
|
}
|
||||||
@ -316,6 +319,9 @@ static void move_rec(void)
|
|||||||
TDB_DATA key, dbuf;
|
TDB_DATA key, dbuf;
|
||||||
struct tdb_context *dst_tdb;
|
struct tdb_context *dst_tdb;
|
||||||
|
|
||||||
|
struct tdb_logging_context log_ctx;
|
||||||
|
log_ctx.log_fn = tdb_log;
|
||||||
|
|
||||||
if (!k) {
|
if (!k) {
|
||||||
help();
|
help();
|
||||||
return;
|
return;
|
||||||
@ -343,7 +349,7 @@ static void move_rec(void)
|
|||||||
|
|
||||||
print_rec(tdb, key, dbuf, NULL);
|
print_rec(tdb, key, dbuf, NULL);
|
||||||
|
|
||||||
dst_tdb = tdb_open_ex(file, 0, 0, O_RDWR, 0600, tdb_log, NULL, NULL);
|
dst_tdb = tdb_open_ex(file, 0, 0, O_RDWR, 0600, &log_ctx, NULL);
|
||||||
if ( !dst_tdb ) {
|
if ( !dst_tdb ) {
|
||||||
terror("unable to open destination tdb");
|
terror("unable to open destination tdb");
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user