X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Fio.c;h=13af1aecc14336043ff8cc85856429152195a301;hp=bdf86b676738d2fa1c067e23f4361a4a8d54650d;hb=04cf551d15ee93716aa0462adadc0a3891480813;hpb=aa12380008323e14f8d7dabe78b174b72f69e2dd;ds=sidebyside diff --git a/ccan/tdb2/io.c b/ccan/tdb2/io.c index bdf86b67..13af1aec 100644 --- a/ccan/tdb2/io.c +++ b/ccan/tdb2/io.c @@ -182,7 +182,7 @@ int zero_out(struct tdb_context *tdb, tdb_off_t off, tdb_len_t len) } while (len) { unsigned todo = len < sizeof(buf) ? len : sizeof(buf); - if (tdb->methods->write(tdb, off, buf, todo) == -1) + if (tdb->methods->twrite(tdb, off, buf, todo) == -1) return -1; len -= todo; off += todo; @@ -282,11 +282,11 @@ int tdb_write_convert(struct tdb_context *tdb, tdb_off_t off, return -1; } memcpy(conv, rec, len); - ret = tdb->methods->write(tdb, off, - tdb_convert(tdb, conv, len), len); + ret = tdb->methods->twrite(tdb, off, + tdb_convert(tdb, conv, len), len); free(conv); } else - ret = tdb->methods->write(tdb, off, rec, len); + ret = tdb->methods->twrite(tdb, off, rec, len); return ret; } @@ -294,7 +294,7 @@ int tdb_write_convert(struct tdb_context *tdb, tdb_off_t off, int tdb_read_convert(struct tdb_context *tdb, tdb_off_t off, void *rec, size_t len) { - int ret = tdb->methods->read(tdb, off, rec, len); + int ret = tdb->methods->tread(tdb, off, rec, len); tdb_convert(tdb, rec, len); return ret; } @@ -329,8 +329,8 @@ static void *_tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_logerr(tdb, TDB_ERR_OOM, TDB_DEBUG_ERROR, "tdb_alloc_read malloc failed len=%zu", (size_t)(prefix + len)); - } else if (unlikely(tdb->methods->read(tdb, offset, buf+prefix, - len) == -1)) { + } else if (unlikely(tdb->methods->tread(tdb, offset, buf+prefix, len) + == -1)) { free(buf); buf = NULL; }